I'm hoping that people will post unusual or little known facts here. It would be proper to include a link to a source for confirmation. Here's a start. Speedy Gonzales was banned by the Cartoon Network for being an offensive stereotype, only to be returned after mass protest by the Hispanic-American community. [link](http://en.wikipedia.org/wiki/Speedy_Gonzales#Censorship)

Member Avatar
Member Avatar
+10 forum 516

I, and many others, desired a "switch" keyword in Python. For me it was to a desire to make some of my code more compact and readable, as I often have many user selected options for the code to weed through. So I set off on a journey to figure out how to create a "switch" like statement. When I returned home, I was much enlightened and more thoroughly up to speed with Python. Great journey. What I settled on was a simple dictionary setup that returns strings that are then immediately evaluated/run with the "exec" keyword. Now "exec" can …

Member Avatar
Member Avatar
+0 forum 3

In a python script I gave a call in this way: do.call([cfg.tool_cmd("cuffdiff"), "-p", str(cfg.project["analysis"]["threads"]), "-b", str(cfg.project["genome"]["fasta"]), "-u", cfg.project["experiment"]["merged"], "-L", "%s,%s" % (str(cfg.project["phenotype"][0])[2:8],str(cfg.project["phenotype"][1])[2:7]), "-o", output_folder] + [cfg.project["samples"][0]["files"]["bam"] + ' ' + cfg.project["samples"][1]["files"]["bam"]], cfg.project["analysis"]["log_file"]) This gives the command: Command '['/usr/local/bin/cuffdiff', '-p', '5', '-b', '/scratchsan/venkatesh/TuxedoProject/data/genome/ce10.fa', '-u', 'pipeline/merging/merged.gtf', '-L', 'embryo,larva', '-o', 'pipeline/degenes', 'pipeline/SAMN00990702-1/mappings/accepted_hits.bam pipeline/SAMN00990702-2/mappings/accepted_hits.bam']' returned non-zero exit status 1 In this command the bam files are separated with space but they are taken as one. 'pipeline/SAMN00990702-1/mappings/accepted_hits.bam pipeline/SAMN00990702-2/mappings/accepted_hits.bam' I want this to be like: 'pipeline/SAMN00990702-1/mappings/accepted_hits.bam' 'pipeline/SAMN00990702-2/mappings/accepted_hits.bam' CAn anyone help me !! Thankyou !!

Member Avatar
Member Avatar
+0 forum 5

what I'm basically trying to do is: x = struct( size=4, order='var0', # <<< struct.__call__( size, order, **vars ) var0 = bu32 # { 'var0': bu32, } ) data = x() # read data from imported file print data.var0 # should return a bu32 int if data.__class__ == x: pass # these next 2 should reference the same object if data.__class__.__class__ == struct: pass if x.__class__ == struct: pass I believe it's possible, but I'm not sure how to do it... so what does everything in the code above do exactly? bu32() is a data function which reads a big-endian …

Member Avatar
Member Avatar
+0 forum 54

I installed Eclipse and it worked for few days and it nolonger openned giving error:- can someone help me (mbusi.ndlovu@gmail.com) Java was started but returned exit code=13 C:\ProgramData\Oracle\Java\javapath\javaw.exe -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmsx512m -jar C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.la uncher_1.3.0.v20140415-2008.jar -os win 32 -ws win32 -arch x86_64 -showsplash C:\Program Files\eclipse-java-luna-SR2-win32-x86\\plugins\org.eclipse.platform_4 .4.2v20150204-1700\splsh.bmp -launcher C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\eclipse.exe -name Eclipse --launcher.library C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.la uncher.win32.win32.x86_64_1.1.200.v2015204-1316\eclipse_1608.dll -startup C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.la uncher_1.3.0.v20140415-2008.jar --launcher.appendVmargs -exitdata e90_5c -product org.eclipse.epp.package.java.product -vm C:\ProgramData\Oracle\Java\javapath\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m -jarC:\Program Files\eclispe-java-SR2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.la uncher_1.3.0.v20140415-2008.jar

Member Avatar
Member Avatar
+0 forum 2

I'm porting some code from a book about ray tracing from C++ to Java, because I like java better and it seems like a decent way to learn how the code works. I ported the code for the Torus Primitive and all seemed well, until I tried to view it with an orthographic Z axis aligned camera and I got major errors. [Image](http://i.imgur.com/wM1GtLD.png) I can't find anything that should be wrong, perhaps because I don't entirely understand the Quartic formula, or perhaps I've missed something in the C++ implementation that needs to be changed to work with Java. I think …

Member Avatar
+0 forum 0

In the course of my programming I have created a new class called Vector (yes I know that vector.h exists, but I like my version better, or at least I have until now). As part of my class, I have overloaded the = to use as an assingment function, as in A=B. Here's the code: Vector& Vector:: operator=(const Vector& u) { if (this!=&u) // check for self assignment { delete[] v; double *newdata=new double[u.L]; for (int i=0; i<u.L; i++) {newdata[i]=u(i);} v = newdata; L = u.L; } return *this; } By why of explanation, u.L returns the length of the …

Member Avatar
Member Avatar
+0 forum 2

I’m trying to patch a routine and I finally found the problem. I am given the following string: [code] $query = "SELECT title, DATE_FORMAT(event_date, '%Y-%c-%e') AS event_date FROM $dbTable WHERE event_date LIKE '$year-$month%'"; [/code] In the month variable at the end, for the months January through September I am returned 1 digit. So without disturbing the rest of the code, I would like to turn the month string into two digits but so far I have not been able to do that with the DATE_FORMAT function. So in January, I am looking for the end result to look like: [code] …

Member Avatar
Member Avatar
+0 forum 1

I was wondering if you could help me with a current issue I am having whilst developing an ER diagram. The problem I am having is with identifying the correct Entities. The scenario I am trying to complete is given below. I have also included a list of entities which I think are needed, however I do not know if these are correct, could you suggest any possible entities and whether the ones I have identified are correct. I have also suggested a few possible relationships please could you assist me in determining whether these are correct. SCENARIO A heavy …

Member Avatar
Member Avatar
+0 forum 6

I have these files.. **str.h** #ifndef _str_h_ #define _str_h_ struct STRSTR { char* MainStr; char* SubStr; }; char* str_str(int, int, struct STRSTR* sample); void init(char*, struct STRSTR* sample); #endif /* _str_h_ */ **str.c** #include "str.h" #include <stdio.h> void init(char* str, struct STRSTR* sample){ sample->MainStr = str; } char* str_str(int index, int size, struct STRSTR* sample){ int length = 0; while ( *(sample->MainStr + length)!= '\0' ) length++; if (index > length) printf( "ERROR!! Index value is greater than the actual size" ); else{ char temp[length]; int i; for ( i = index; i < size; i++ ) { temp[i] = …

Member Avatar
Member Avatar
+0 forum 5

I have a chart that is being populated from a query in the vb code but when the chart is displayed there is an extra x-axis grid tick. How do i get the x-axis grid to only display the number of items being returned? **VB code: ** Public Function CLGenerateRevenueHistoryChart() 'call method to populate client infromation/client contact information Dim clientCode As String = CLClientCodeTextBox.Text 'client code entered in the text box Dim clientRevenue As Double = 0 'the revenue for the client each year Dim yearsArray(6) As String 'array of years (2015,2014,2014,....,2010) Dim revenueArray(6) As Double 'array of revenue values …

Member Avatar
+0 forum 0

So the other day I was just experamenting with some code, just for fun, and I ran into some difficulties. So I suppose my question is why the following code does not write to the original bigints array. I am sure I am doing something dumb, but please bear with me. I made my own simple "state machine" thinking that I could return what is essentially a reference to the value in the array, and get away with only two BigIntegers being in memory at any given time. What seems to be happening though is that the value of the …

Member Avatar
Member Avatar
+0 forum 7

Hey Im making an online store and cant figure out the section on inserting data into a table (in this case its inserting customer details into a customer table). Its the VALUES line that is displaying the error: mysql_query() expects parameter 1 to be string, resource given. I have looked at other similiar problems on this but havent been able to solve the issue Any HELP would be greatly appreciated?? /*** 4. trying to insert the data from into table, the result of query are returned in a variable $insertedData $insertedData = mysql_query($serverConnection, "INSERT INTO customertable(CustomerID, FirstName, SurName, Address, PhoneNum, …

Member Avatar
Member Avatar
+0 forum 9

I have a dropdown list populated with files pulled from a directory using the PHP listed below that then gets displayed onto a form and am trying to figure out how I can delete them using a delete button in the form when they're selected and displayed. <input type="hidden" name="Action" value="EDIT" /><input type="hidden" name="Selection" id="Selection" value="-1"><div>Below is the list of your saved codes. To edit your codes, select it from the list.</div> <select size="1" name="CodeList" id="CodeList"> <?php $directory = $directory = 'users/' . $_SESSION['username']; $filesContents = Array(); $files = scandir( $directory ) ; foreach( $files as $file ) { if …

Member Avatar
Member Avatar
+0 forum 2

So last night I was running a program that utilized 100% of my CPU for a while and my desktop crashed. It turned itself off, and the power light (next to the power button) was blinking slowly. Pressing the power button did nothing. The light remained blinking until I cut the power, and when I returned power nothing at all happened - the blinking didn't return and the power button still did nothing. So to pinpoint the problem, I first checked the power supply. The power supply fan starts up when the green wire is shorted to ground. When I …

Member Avatar
Member Avatar
+0 forum 1

#Template for Program 6 #Complete the code in each module as discussed in #the Program 6 Instructions def main(): #initialize variables so incomplete code won't cause errors #can be deleted once code is finished totalRainfall = 0 minRainfall = 0 maxRainfall = 0 #prints the progam title and a blank line print("Rainfall Calculator with Array") print() #declares an empty array (list) called rainfall to #which you can append values with the append method rainfall=[] #for loop to loop from 0 to 11 #remember the 1st element of an array is at subscript 0 for index in range(12): #input rainfall for …

Member Avatar
Member Avatar
+0 forum 4

I have a silverlight application with one report. It builds and runs fine in visual studio 2013. I deployed that web application on my localhost and it is throwing "The remote server returned an error : NotFound" error. I tried following things...none of them worked out - Build x86 and published Set 32 bit setting true in IIS Every folder has complete access rights and I can't get the description of the error, even if I put includeExceptionDetailInFaults="true". Please help. Thank You

Member Avatar
Member Avatar
+0 forum 1

The End.