Posts

c - Void function error (value computed is not used) -

hi have tried couple variations of code , can't figure out how resolve these warnings. the objective create modular representation of monty hall problem in c problem my outputfinalresult function fails give me correct output error messages - gcc -wall monteball.c monteball.c: in function ‘determineoutcomestay’: monteball.c:125:7: warning: value computed not used [-wunused-value] monteball.c:127:3: warning: value computed not used [-wunused-value] monteball.c: in function ‘determineoutcomeswitch’: monteball.c:134:7: warning: value computed not used [-wunused-value] monteball.c:136:3: warning: value computed not used [-wunused-value] monteball.c: in function ‘getfinalchoice’: monteball.c:119:1: warning: control reaches end of non-void function [-wreturn-type] an aside should worried warning? code void outputfinalresult (int winstay, int winswitch, int staycount, int switchcount); //function 4 print statements using arguments calculated determineoutc...

IOS file upload encountering stream error -

Image
i use parse backend , create ios app uploading images. when upload using wifi network there no problem, encountering file upload error when using 4g/3g network. encountered stream error: error domain=nsposixerrordomain code=54 "the operation couldn’t completed. connection reset peer" although catch error in code alert view didn't show up, shows "upload fail" in log. pffile *file = [pffile filewithname:filename data:filedata]; [file saveinbackgroundwithblock:^(bool succeeded, nserror *error) { if (error) { uialertview *alertview = [[uialertview alloc]initwithtitle:@"an error occured!" message:@"please try submiting item again." delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil, nil]; [alertview show]; } the data in backend looks this: as can see, successful upload file name image.jpg, unsuccessful ones, shows unknow string. it network problem, can please ensure speed netw...

How to configure Mule Properties Editor in Mule Studio -

i have usecase , need encrypt values presented in properties file under src/main/resources. mule provided concept called mule credentials vault. in document there place can open properties file in "mule properties editor" view. can please let me out configured in local mule studio. thanks. regards vikram as per vikram need install plugin first .you can descripotion in below link https://developer.mulesoft.com/docs/display/current/mule+credentials+vault and can find example application in below link https://developer.mulesoft.com/docs/display/current/anypoint+enterprise+security+example+application

ios - "argument contains uninitialised data" when setting frame -

i new ios development , handling memory leaks. in project while analysing project got memory leaks. not fix below logic error @ below code. cgrect labelframe; if ([questonmod.questiontype isequaltostring:@"type1"]) { nooflinesint=questonmod.questiontext.length/20; if (nooflinesint<1) { nooflinesint=nooflinesint+2; } else { nooflinesint=nooflinesint+1; } labelframe= cgrectmake(5, 0, cell.frame.size.width-10, nooflinesint*18); } else if([questonmod.questiontype isequaltostring:@"type2"]) { nooflinesint=questonmod.questiontext.length/10; if (nooflinesint<1) { nooflinesint=nooflinesint+2; } else { nooflinesint=nooflinesint+1; } labelframe= cgrectmake(5,0,cell.frame.size.width-155,nooflinesint*16); } cell.questionlabel.frame=labelframe; //at line got below error. i getting "passed-by-value struct argument contains uninitialised data(e.g., via fiel...

python - Django-administration css file not rendered -

i using django administration basic crud . admin template loads , css files loaded showing no effect @ all. i tried collect static files below manage.py collectstaic it shows following errors traceback (most recent call last): file "c:\python27\lib\site-packages\django\bin\hello\manage.py", line 10, in module> execute_from_command_line(sys.argv) file "c:\python27\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line utility.execute() file "c:\python27\lib\site-packages\django\core\management\__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "c:\python27\lib\site-packages\django\core\management\__init__.py", line 272, in fetch_command klass = load_command_class(app_name, subcommand) file "c:\python27\lib\site-packages\django\core\management\__init__.py", line 76, in load_command_class return module.command() ...

java - JOptionPane not showing up (null parameter, called from inner class) -

i new java, trying make simple application , there no way can joptionpane show correctly , guess missing something: here's code: import java.awt.color; import java.awt.window; import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.jframe; import javax.swing.jmenu; import javax.swing.jmenubar; import javax.swing.jmenuitem; import javax.swing.joptionpane; import javax.swing.jpanel; public class frame extends jframe { private static final long serialversionuid = 1l; final static int width = 400; final static int height = 400; public frame() { super("convert dxf alpha ver. - survey apps 2014"); setdefaultcloseoperation(exit_on_close); setsize(width, height); setresizable(false); setlocation(100, 100); setbackground(color.white); setvisible(true); welcomepanel welcomepanel = new welcomepanel(this); add(welcomepanel); ...

actionscript 3 - How to force debug player not to launch a debug window, but silently output a message -

i want test cpu intensive swf file in firefox browser. problem whenever unhandled error encountered, shows debug window. trying handle each , every error,but becomes difficult because @ each error, browser hangs completely. , have restart. so, there way, eg. through compiler etc, can tell debug player, not show in window, , halt process, other way show output ? i use general try..catch block. still many times, window pops up. seems like, try..catch block not work in every case. here simple example : code, lists files in directory, list component. when clicked, selected file, must load. so, there no problem swf or picture files ( jpg, png etc). say, click upon "fla" should not load. error window pops unpredictably : error #2044: unhandled ioerrorevent:. text=error #2124: loaded file unknown type. var loader:loader =new loader(); loader.contentloaderinfo.addeventlistener(event.complete,doneload); loader.contentloaderinfo.addeventlistener(ioerrorevent.io_error,loading...