Posts

Showing posts from January, 2013

ios - Line breaks using FMDB and Obj-C -

i'm relatively new ios programming, please bear me. i'm creating app calls recipes table view, listing measurements , ingredients labels in detail view. catalogued recipes in google sheets, downloaded .csv file , populated table using sqlitestudio. exported database, , using fmdb, plopped in app. works fine there , i'm able retrieve various fields. what i'm trying list out measurements , ingredients displays line breaks: 0.5 oz. 1.0 oz. 1 jigger and not as: 0.5 oz., 1.0 oz., 1 jigger how wrote google doc. i've tried using \n in sqlite viewer outputs string rather encoding new line. however, when view accompanying .sql file, textmate2 reads new lines. i'm not sure if have apply code within tableviewcontroller implementation file call fmdb or elsewhere. i have been looking solution awhile no luck. in steering me in right direction appreciated. thanks! cocktaillisttableviewcontroller.m - (nsmutablearray *)recipecocktails { recipecocktails = [

how can I trace back beyond dispatch_async when debugging an iOS program? -

Image
i wonder if knows how can trace beyond dispatch_async when debugging ios program. program constant crash @ 2 spots: in buffer_is_unused, shown in , , , in release_shmem_bitmap, shown in , . none of happens @ main thread, , on thread-local stack there nothing except dispatch_async , pthread jobs. given configuration of xcode, gives me no information on called dispatched_async. googled "release_shmem_bitmap" , found few webpage on web , none of them helpful. wonder if knows how can make xcode show called these dispatch_async or in general how shall fix such crash?

javascript - Reset link background color on previously selected -

hi have song playlist & use javascript in player set ground color light green on playing song. aware use a:focus if user selects lyrics while song playing song continue play looses focus background color reverts original. need way use javascript change color of song original when song no longer playing or song selected. code below. <!-- video player script --> var video_playlist = document.getelementbyid("video_player"); var links = video_playlist.getelementsbytagname('a'); (var i=0; i<links.length; i++) { links[i].onclick = handler; }; function handler(e) { e.preventdefault(); videotarget = this.getattribute("href"); filename = videotarget.substr(0, videotarget.lastindexof('.')) || videotarget; video = document.queryselector("#video_player video"); source = document.queryselectorall("#video_player video source"

php - Wordpress, add custom button on post type list page -

Image
i trying add custom button on top of post type page image is there filter or action can use add custom button there? thanks i found way done not happy procedure. please add answer if find better way. mean while, might of help. add_action('admin_head-edit.php','addcustomimportbutton'); i need on edit page, using admin_head-edit.php action, can use admin_head or other (not specific requirement) /** * adds "import" button on module list page */ public function addcustomimportbutton() { global $current_screen; // not our post type, exit earlier // can remove if condition if don't have specific post type restrict to. if ('module' != $current_screen->post_type) { return; } ?> <script type="text/javascript"> jquery(document).ready( function($) { jquery(jquery(".wrap h2")[0]).append("<a id='doc_popup'

javascript - Js files not loading properly -

Image
css files seem load properly. js files seem load, of them inactive, no error message on consol. my files are: <head> <link rel="stylesheet" href="/static/libs/font-awesome4/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="/static/libs/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/static/css/style.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src="/static/js/script.js"></script> <link rel="stylesheet" href="/_debug_toolbar/static/css/toolbar.css?0.7082793798424954" type="text/css"> </head> the file site-specific script.js. script.js short code below: $.fn.countdown = function (callback, duration, message) {

javascript - Taking 3 array elements and making them a single formatted string -

i'm running ajax request returns json data: { "error":0, "fleet":[ { "fleet_uid":859805, "purpose":0, "ower":1, "time":520, "con_time":647, "from":[ 6, 300, 2 ], "target":[ 6, 300, 6 ], "start_user_id":20457507089, "target_user_id":20510481089, "start_planet_name":"tweenis12", "target_planet_name":"p23808" }, { "fleet_uid":859803, "purpose":0, "ower":1, "time":508, "con_time":647, "from":[ 6, 300, 2 ], "target":[ 6, 300, 6 ], "start_user_id":20457507089, "target_user_id":20510481089, "start_planet_name":&quo

c++ - Shuffling a linked list -

i have class pseudo-library. driver creates library novicelibrary can different things, add books library (nodes linked list listnode), remove books, , such , such. the shufflebooks() last function have write. else works , can add/remove books. function needs put nodes in linked list in random order. cannot use tail pointer, i've seen in other algorithms. can't use arrays. thought had written there pointers p1 , p2 swap nodes in list. program stalls , doesn't give me useful information in log. void shufflebooks (int bookcount) { int r1 = rand() % bookcount; int r2 = rand() % bookcount; listnode *p1 = head; listnode *p2 = head; // here trying swap happen 4 times bookcount (int = 0; < bookcount*4; i++) { (int = 0; < r1; i++) p1 = p1->next; (int = 0; < r2; i++) p2 = p2->next; swap(p1->bookval, p2->bookval); } } very close, swapping pointe

ios - Could not cast value of type 'UITableViewCell' to '(AppName).(CustomCellName)' -

i'm trying create custom table view cell using xcode 6.3 swift 1.2. reason in cellforrowatindexpath method, can't seem set cell variable. code compile, when line of code hits: var cell:messagecell = tableview.dequeuereusablecellwithidentifier("messagecell") as! messagecell i error: not cast value of type 'uitableviewcell' (0x1112f5a18) 'campusexchange.messagecell' (0x10e8318f0). here's full method: (i'm using parse if you're wondering how i'm setting message) func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { var cell:messagecell = tableview.dequeuereusablecellwithidentifier("messagecell") as! messagecell let message = messagesarray[indexpath.row]["message"] as? string cell.messageoutlet.text = message return cell } thanks might have. can't seem work. there few things can check this: see if table linked c

python - Matplotlib fill alpha changes color -

i trying make matplotlib create fill transparent using alpha command, seems change color. it's there way increase transparency without changing color? ax.fill_between(x, 0, y[0], facecolor='#614126', interpolate=true, alpha=.3) i've run similar issue, specifying alpha value caused color revert default blue. in case, able override whatever causing change using setp() , so: my_plot = ax.fill_between(x, 0, y[0], interpolate=true, alpha=.3) matplotlib.pyplot.setp(my_plot, facecolor='#614126')

php - in a hidden input, how to get the input text value in another input? -

i'm using php. there're 2 inputs, aa , bb. aa text input users can input something, , want bb (which hidden input) submitted input value aa. tried this, however, seems aa_value null in input bb when submitting form. how implement that? aa_value() { $value = ''; if ( isset( $_post['aa'] ) ) $value = $_post['aa']; echo $value; } <input type="text" name="aa" id="aa" value="<?php aa_value(); ?> <input type="hidden" name="bb" id="bb" value="<?php aa_value(); ?> php server side language execute before render html on browser. need use javascript or jquery solve problem. use below code on blur or change. <input type="text" name="aa" id="aa" value="<?php aa_value(); ?> <input type="hidden" name="bb" id="bb"

mips - Memory addresses in assembly -

i cannot figure out going wrong here. attempting store 10 integers in memory , access each of them in order. here current code: .data # data declaration section strinmsg: .asciiz "please enter integer:" .align 2 memaddr: .space 40 .text main: #get 10 integers , store them in $t0 la $t0, memaddr #$t0 - 40 = first element in array add $t3, $zero, $zero add $t1, $zero, 10 loop: la $a0,strinmsg add $v0, $zero, 4 syscall add $v0, $zero, 5 syscall sw $v0, 0($t0) add $s1, $s1, 4 sub $t1, $t1, 1 bgtz $t1, loop #la $a0, memaddr #sub $t0, $t0, 40 #j quicksort sub $t0, $t0, 40 #<--- problem line lw $t3, 0($t0) add $a0, $t3, $zero addi $v0, $zero, 1 syscall what happens correctly gets 10 integers user, , if rid of problem line print last element expected because memory address stored in $t0. thought subtract 40 bring front outputs 0. how can first element? you're never incrementing $t0 within loop, you'll writing values same address, , when subtr

python - Tree of trees? Table of trees? What kind of data structure have I created? -

i creating python module creates , operates on data structures store lots of semantically tagged data , metadata real experiments. in experiment have: subjects treatments replicates enclosing these 3 categories experiment, , combinations of 3 categories calling "units". there no inherently correct hierarchy between 3 (table-like) analyses useful think of permutation of 3 hierarchy, e.g. (subjects-->(treatments-->(replicates))) or (replicates-->(treatments-->(subjects))) moreover, when collecting data, files copy-pasted folder on desktop, data @ least coming in tree. have thought lot hierarchy "better" keep coming use cases of 6 possible permutations. want module flexible in user can think of experiment or collect data using whatever hierarchy, table, hierarchy-table hybrid makes sense them. also "units" or (table entries) containers arbitrary amounts of data (bytes gigabytes, whatever ideally) of organizational complexit

c - Only one process is passing through my mutex lock and the others are hanging -

so working on program allow me open single instances of files using multiple processes without deadlock occurring. key function program below. decides if program can execute file based on adjacency graph. part seems work fine. the trouble running seems mutex locking. how program executes decides 1 process need run before other processes able open files without deadlock (this fine , expected behavior). once first process finishes hangs , believe have narrowed down pthread_mutex_lock call @ top part of code. yet can see unlock quite confused. could have fact mutex being used in shared memory block? can't imagine cause problems , there no other way me really. tried same thing using semaphore no luck. appreciated. file *openfile(char *path, char *mode) { int segid = shmget(systemkey, size, s_irusr | s_iwusr | ipc_creat); memstruct* ourmem = (memstruct*)shmat(segid, null, 0); pthread_mutex_lock(&ourmem->openmutex);//~~~~~~~~~~ int hascycle = containscycle(ourmem, pat

Javascript + HTML: Button Not Calling on Function Onclick -

i have made button: <input type="button" value="a" onclick="searchletter(this)"></input> when clicked, supposed call on function checks if letter in word , if is, add spaces array in corresponding spot: function searchletter(obj) { var letter = obj.value; obj.disable; (i = 0; <= word.length; i++){ if (word[i] == letter) { wordspaces[i] = letter; document.getelementbyid('spaces').innerhtml = wordspaces.join(''); break; } } } however, button not calling on , not sure why. here jsfiddle (hangman) function pickword() { var word = dictionary[math.floor(math.random() * dictionary.length)]; var wordspaces = []; (var = word.length - 1; >= 0; i--) wordspaces.push("_ "); document.getelementbyid('spaces').innerhtml = wordspaces.join(''); } i

ios - UITableViewCell Font size does not change -

i have custom uitableviewcell being displayed in tableview. uitableviewcell generated nib file. uitableviewcell has uilabel in it.the code of given below.apparently have tried decrease font size fixed size , nothing seems work.here doing set font size. in uitableviewcell (this .m file attached nib) here do - (void)awakefromnib { uifont *myfont = [ uifont fontwithname: @"arial" size: 4.0 ]; self.labelmylabel.font = myfont; } this how tableview being created - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *transferidentifier = @"transfertableitem"; filetransfertablecell *cell = [tableview dequeuereusablecellwithidentifier:transferidentifier]; if (cell == nil) { nsarray *nib = [[nsbundle mainbundle] loadnibnamed:@"filecustomtablecell" owner:self options:nil]; cell = [nib objectatindex:0]; } //set text in uitableviewcell

java - Building two 2-D arrays from file data -

i'm tasked writing 2 matrices file (which have done), read data file perform various calculations. having difficulty rebuilding each matrix within method perform calculations. decided use arraylist of arraylist, in order 2-d matrix need. using bufferedreader, need loop through 1 matrix, adding elements 1 arraylist, second matrix. added titles above matrices act markers find matrix data want use. there better way it? public void sum() throws ioexception { arraylist<arraylist<integer>> matrixarray = new arraylist<>(); while(br.read() != -1) { arraylist row = new arraylist(); //tried this, using 2 println spaces between matrices //but realized can't use readline way while(!br.readline().equals("\n\n")) { row.add(br.read()); } matrixarray.add(row); } the file data of form: matrix 1 b c d matrix 2 b c d --update--from comment below while(file.hasnext())

eclipse - When I compile this with Ant the exclude tag does not work -

this ant build.xml: <target name = "build" depends="clean" description = "compile main source tree java files"> <mkdir dir = "${build.dir}"/> <javac destdir = "${build.dir}" source = "1.6" target = "1.6" debug = "true" deprecation = "false" optimize = "false" failonerror = "false" includeantruntime="true" > <src path = "${src.dir}"/> <include name="com/**/*" /> <exclude name="${src.dir}/com/cheom/db/dbmethodtest.java"/> <classpath refid = "master-classpath"/> </javac> </target> and console output: [javac] compiling 5 source files /users/josh/google drive/workdocs/jee/monitordbflow/classes [javac] /users/josh/google drive/workdocs/jee/monitordbflow/src/com/cheom/db/dbmethodtest.java:

random - Python sample without 0 -

i need sample k numbers in [-n,-1] union [1,n] without replacement. why doesn't code work? random.sample(range(-n,n+1).remove(0),k) i traceback (most recent call last): file "<input>", line 1, in <module> file "/usr/lib/python2.7/random.py", line 319, in sample n = len(population) typeerror: object of type 'nonetype' has no len() remove inplace operation. modifies list, , returns none. that's why seeing error. should create list separately , pass sample : >>> l = range(-n, n+1) >>> l.remove(0) >>> random.sample(l, k) if want in 1 statement, create 2 parts of range separately , add them. >>> random.sample(range(-n, 0) + range(1, n+1), k)

osx - How can I run .sh file on MAC from other directory -

i'm new mac developing. i try create project.sh file , run via terminal see mac.zip more details. the main class (com.myclass.myclass) in "main.jar" requires lib1.jar, lib2.jar, , sublib1.jar the "classpath" property in "project.sh" created via script, cannot changed in project.sh the value in relative path format such "../../lib/lib1.jar" when try run "mac/project" directory contains main.jar , project.sh via mac terminal it work fine following gui-imac:project gui$ ./project.sh aclass bclass cclass however, when try run project.sh other directory, failed. for example: run desktop directory: gui-imac:desktop gui$ "/users/gui/desktop/gui/mac/project/project.sh" error: not find or load main class com.myclass.myclass how can run project.sh other directory? please me solve problem. thanks in advance. earist i don't know if answer looking run .sh script directory can use $sh /u

java - Button in Panel Communicating as an action event to change between Panels -

we're making app 1 of classes supposed draw interest of 4th-6th graders, we're looking make game type environment. i'm looking find seamless way transfer 1 page other. i've found if try close , open frames jumps , looks less professional, wondering if there way communicate between panels if button pressed on panel, set panel's visibility false , set panel true(as though has changed screens).

Azure Search scoring -

i have sets of 3 identical (in text) items in azure search varying on price , points. cheaper products higher points boosted higher. (price boosted more points, , boosted inversely). however, keep seeing search results similar this. search on ‘john milton’. i product="id = 2-462109171829-1, price=116.57, points= 7, name=life of schamyl / john milton mackie, description=.", score=32.499783 product="id = 2-462109171829-2, price=116.40, points= 9, name=life of schamyl / john milton mackie, description=.", score=32.454872 product="id = 2-462109171829-3, price=115.64, points= 9, name=life of schamyl / john milton mackie, description=.", score=32.316270 i expect scoring order this, lowest price first. product="id = 2-462109171829-3, price=115.64, points= 9, name=life of schamyl / john milton mackie, description=.", score= product="id = 2-462109171829-2, price=116.40, points= 9, name=life of schamyl / john milton mackie, descri

c# - Get value from property in foreach loop -

i having issue getting values property of type viewmodel passing in. current method, believe name of property being stored right, can't seem value work. advice appreciated. believe have problems dictionary when type of value not string also, problem later :). here method taking in viewmodel type: public type convertmodel(type mytype) { dictionary<string,string> dic = new dictionary<string,string>(); foreach (var prop in mytype.getproperties()) { dic.add(prop.name, prop.getvalue(mytype,null).tostring()); } //return mytype; } this how method being called(ignore method name trying idea out): public actionresult index() { var viewmodel = new myviewmodel() { firstname = "shawn", lastname = "michaels" }; var newtype = convertmodel(viewmodel.gettype()); retur

c# - VSTO Excel Add-In - WPF XAML Style issue -

i creating vsto office excel-add-in in popping simple wpf window. window styled mahapps library. issue no matter approach use, icons while showing fine in visual studio preview, during debug missing. icons.xaml responsible showing icons installed in resources folder, build action set page. thoughts issue? <controls:metrowindow.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/controls.xaml" /> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/fonts.xaml" /> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/colors.xaml" /> <resourcedictionary source="pack://application:,,,/mahapps.metro;component/styles/accents/blue.xaml" /> <resourcedictionary source="pac

php - How to deal with passwords, API keys, etc in development stack? (git, webservers, etc) -

i'm planning large php project commercial website dealing bitcoin-related services. attractive target hackers. besides making site secure possible, i'm wrapping head around things like: database logins , passwords, public + private keys, secret authentication keys remote apis or external services, ssh keys, bitcoin wallets, etc. obviously need them somewhere within php sources. put secret or sensitive details in separate include file (e.g. 'passwords.php'), place outside of http document root. visitors can never directly access file itself. but there's more: what hosting provider? of course have trust them if i'm hosting server them in first place, there can lower risk of employee abusing risky stuff such bitcoin exchange api keys? git repositories: if host git reposities remotely, should keep passwords.php file out of git repository, make sure data doesn't leak anywhere? (but how go version control or distribute team members?) strict communic

android - listview with a custom adapter - every other item element are duplicates -

i have come accross bit of weird problem (i think) listview , customadapter. the problem have different view elements every item in listview, such edittext fields among others. whenever have more 2 items in listview, entries these elements in every other item. let me give example: - adding 8 items listview. - enter value in first textfield - same value repeats in textfields: 3, 5 , 7 - if enter value in second item's textfield, value repeated in textfield of item number: 4, 6 , 8 i hope can see problem now. here of relevant code problem: first, code customadapter (createprogramadapter): public class createprogramadapter extends baseadapter { private layoutinflater inflater; private arraylist<trainingpass> trainingpasses; private list<trainingpass> items; private int layoutresourceid; private context context; public createprogramadapter(context context, list<trainingpass> items) { this.context = context;

Converting my Objective C codes to Swift code -

i have existing app constructed using objective-c. my question is. how can convert app use swift code or have recreate app using swift code? thank you. you can't convert code swift. have rewrite it. keep in mind can use both swift , objective-c in same project. swift , objective-c in same project

android - support.v7.app.AlertDialog throws NullPointerException on dismiss -

i updated appcompat newly released revision 22.1.0 , changed alertdialog support.v7.app.alertdialog . on lollipop device, throws following exception on dismissdialog() . java.lang.nullpointerexception: attempt invoke virtual method 'java.lang.class java.lang.object.getclass()' on null object reference @ android.support.v7.internal.app.windowdecoractionbar.getdecortoolbar(windowdecoractionbar.java:248) @ android.support.v7.internal.app.windowdecoractionbar.init(windowdecoractionbar.java:201) @ android.support.v7.internal.app.windowdecoractionbar.<init>(windowdecoractionbar.java:184) @ android.support.v7.app.appcompatdeleg ateimplv7.cre atesupportactionbar(appcompatdelegateimplv7.java:176) @ android.support.v7.app.appcompatdelegateimplbase.getsupportactionbar(appcompatdelegateimplbase.java:85) @ android.support.v7.app.appcompatdelegateimplv7.onstop(appcompatdeleg ateimplv7.java:221) @ android.support.v7.app.appcompatdialog.onstop(appcompatdialog.

Multiple Definitions in C++ (Visual Basic 2010) -

i'm attempting practice coding in free time (combining number of different interests of mine keep myself engaged) , i've encountered odd error can't find answer to. have 4 files i'm working with, 2 header files, 1 class definition file , main file. i'm confident i'm not including dice.h file more once (however error points , i'm not sure anymore, hence question). have bungled here produce these errors? the error codes error 3 error lnk1169: 1 or more multiply defined symbols found (file path trimmed) error 2 error lnk2005: "int __cdecl dice(int,int)" (?dice@@yahhh@z) defined in creature.obj (file path trimmed) the filepath: c:\users\username\documents\visual studio2010\projects\rpgtest\rpgtest\rpgtest.(error 3 referenced .exe file, error 2 referenced .obj file). the code itself: dice.h #ifndef set_dice_h_ #define set_dice_h_ #include <iomanip> #include <iostream> #include <stdlib.h> using name

How to Automate if PDF is a part of a webpage (iframe) using Selenium? -

i trying automate 1 of functionality through selenium. i have field, report number. if report number entered operator, bring out patient name , id , below pdf getting loaded part of iframe.. looks pdf embedded iframe. <iframe id="pdfframe" width="100%" height="800px" src="pdf.aspx?template=&amp;actionid=1"></iframe> i wanted enter few fields doctor whom want meet, alloted time etc in embedded pdf , once details filled if click send.. go doctor email , patient email.. i can able enter report number in webpage.. swithcto option can enter values in pdf??? because need xpath enter it. no clue find xpath pdf field.. possible or not?? to enter iframe need driver.switchto().frame("iframe"); , can interact dom in iframe. in case want interact pdf. pdf content not part of dom. browser rendering pdf it's own inbuilt tools , not attached actual dom not able interact pdf using selenium. there option

android - snooze not working for alarm manager -

Image
snoozebtn.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { intent myintent = new intent(getapplicationcontext(), alarmalertbroadcastreciever.class); myintent.putextra("alarm", this); pendingintent pendingintent = pendingintent.getbroadcast(getapplicationcontext(), 0, myintent,pendingintent.flag_cancel_current); alarmmanager alarmmanager = (alarmmanager)getapplicationcontext().getsystemservice(context.alarm_service); alarmmanager.set(alarmmanager.rtc_wakeup, getalarmtime().gettimeinmillis(), pendingintent); toast.maketext(getapplicationcontext(), "snoozed 10 mins", toast.length_long); finish(); } }); when click snooze button, alarm must restart after 10 mins , not working. i set alarm after 10 seconds, logcat after 10sec when click snooze button full logcat enter code here public class alarmalert

xmpp - Send message from ejabberd using Erlang -

i have simple ejabebrd plugin , need send message it.here posted code sample , error got. kindly give me feedback on this. my code: -module(mod_final). -on_load(send_message/0). -behaviour(gen_mod). -export([start/2, stop/1]). -include("ejabberd.hrl"). -include("logger.hrl"). -include("jlib.hrl"). start(_host, _opt) -> ?info_msg("mod_final starting", []), ok. stop(_host) -> ?info_msg("mod_final stoping", []), ok. send_message() -> luser = "test1", lserver = "localhost", = jlib:make_jid(luser, lserver, []), tuser = "test2", tserver = "localhost", = jlib:make_jid(tuser, tserver, []), fromaddress = jlib:jid_to_string(from), toaddress = jlib:jid_to_string(to), ?info_msg("send message starting", []), xmlbody = {xmlelement, "message", [{"id", []},{"type", "chat"}

How to get return rowcount from stored proceedure - SQL Server 2012 -

Image
i writing stored procedure in sql server 2012 , facing problem while reading number of rows stored procedure return after matching conditions , join criteria. my stored procedure is: select distinct count(crs.courseid) over() recordcounts, crs.courseid, crs.coursename, crs.coursedescription, (select coursegroupname coursegroup cgrp cgrp.coursegroupid = crs.coursegroupid) category courses crs inner join courserequests creq on crs.courseid = creq.courseid crs.coursename <> '''' it returning 16 "recordcounts" 1 of condition, in actual, result 3 rows only. can me this? thanks below screenshot give more clear idea problem 1 of condition: try this: ;with cte as( select distinct crs.courseid, crs.coursename, crs.coursedescription, (select coursegroupname coursegroup cgrp cgrp.coursegroupid = crs.coursegroupid) category courses crs inner join courserequests creq

Magento Configurable Swatches Product Attributes showing "Yes" and "No" -

Image
in admin configuration configurable swatches, under product attributes listed "yes" , "no" option. expect list @ least "color" attribute have set via manage attributes. please have @ below snapshot. any solution? i manage fix issue. apparently during installation quite few .php files in app\code\core\mage\configurableswatches\model wasn't copied correctly. example, select.php becomes folder name instead of php file (i don't know why happened). so did delete whole content of model folder , copy magento installation folder.

jsf - datatable autoscroll in tab not working properly -

Image
this code <p:tab> <p:datatable var="car" value="#{dtscrollview.cars}" scrollrows="10" scrollable="true" livescroll="true" scrollheight="150"> <f:facet name="header"> <h:outputtext value="cclist" /> </f:facet> <p:column headertext="year" style="width:100% !important;" rendered="true"> <h:outputtext value="#{car.year}"/> </p:column> <p:column headertext="brand" style="width:100% !important;" rendered="true"> <h:outputtext value="#{car.manufacturer}"/> </p:column> <p:column headertext="color" style="width:100% !important;" rendered="true" &g

java - Trying to run Glassfish server on OpenShift in a DIY cartridge -

i'm trying run glassfish on openshift in diy cartridge , have problem because i'm receiving error saying can't bind port 8080. i have been talking openshift support , have told me must remove ruby file binding 8080 port. error: [#|2015-04-21t17:58:27.887-0400|severe|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_threadid=1;_threadname=main;|shutting down v3 due startup exception : permission denied: 8080=com.sun.enterprise.v3.services.impl.monitor.monitorableselectorhandler@15ac5d5|#] i think have done this, because have removed .rb file in git directory problem persists. does have suggestions? you need make sure glassfish server binding port 8080 on gear's ip address, openshift_diy_ip environment variable.

objective c - Detect old file name and new file name via FSEventsFramework -

i using fseventsframework monitor directories changes. wondering if logic here sound, detecting old file name , new name after rename. i think on rename, both events in same callback. old file name have event id x-1 new file name have id x is true? thanks as far experienced it, assumption not true. on fseventstreamcreate pass latency flag meaning of latency kfseventstreamcreateflagnodefer . therefore events may or may not come in same callback. furthermore there different ways file can renamed. filesystem-apis rename file while keeping inode mv , others nsdocument create new inode. receive kfseventstreameventflagitemrenamed in callback, not. edit: alternatives fsevents kernel queues , nsfilecoordinator fsevents somehow not documented in api-docs. have @ header file fsevent.h, there more read there. then see going on rename, run app , renaming finder, terminal mv in document based app using small triangle right filename.

javascript - jQuery function to loop through elements and set class names based on order compared to an element with a specific class name -

current codepen: http://codepen.io/anon/pen/rvnpvg <div class="box">box1</div> <div class="box">box2</div> <div class="box active">box3</div> <div class="box">box4</div> <div class="box">box5</div> i'm working on best way , love input. i'm writing function loop through set of elements have class name of box . 1 of elements in list have class name of active . elements prior 1 active class, want set class name of done . of elements after 1 active class, want set class name of hidden . the way i've done seems unnecessarily iterative , i'm wondering if can provide elegant method. any appreciated. thank in advance time! var $activebox = $('.box.active'); $activebox.prevall('.box').addclass('done'); $activebox.nextall('.box').addclass('hidden');

SQL SERVER CAL FUNCTION IN IN CLAUSE -

i have function returns set of itemcodes . result correct when call in stored procedure doesn't show anything: declare @itemgroupcode int set @itemgroupcode=118 declare @todate datetime set @todate='15.april.15' declare @group nvarchar(max) set @group=(select [dbo].[currproduction] (118,'15.april.2015')) select @group select * ( select o.itemcode [item],tm.itemname dscription,o.warehouse wr,obtn.lotnumber, itl1.quantity qty ,tm.u_reusb,@group grp oinm o inner join oitl on oitl.doctype = o .transtype , oitl.docnum = o.base_ref , oitl.docline= o .doclinenum , oitl .loccode = o.warehouse , o .itemcode = oitl.itemcode inner join itl1 on itl1.logentry = oitl.logentry , itl1.itemcode=oitl.itemcode inner join oitm tm on tm.itemcode = itl1.itemcode inner join oitb on tm .itmsgrpcod = oitb .itmsgrpcod inner join owhs oh on o.warehouse=oh.whscode inner join obtn on obtn.sysnumber = itl1.sysnumber , obtn.itemcode = itl1.itemcode , tm.man