Search Results

Search found 20242 results on 810 pages for 'faith in unseen things'.

Page 10/810 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Things you can draw with HTML tables

    - by Coronatus
    So I was watching a talk by Google's Marissa Mayer about speeding up Google's pages. They found that a shopping cart icon increased load time by 2%, and users then searched 2% less. They managed to replace the icon with an HTML table. Here is my attempt at drawing a shopping cart: (live example page) <html> <head> <style> table {border-collapse: collapse;} th, td {width: 8px; height: 8px;} th {background-color: blue;} td {background-color: white;} </style> </head> <body> <table> <!-- this row is just to see alignment --> <tr> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> </tr> <!-- handle --> <tr> <td colspan="14"></td> <th colspan="3"></th> <td colspan="3"></td> </tr> <tr> <td colspan="13"></td> <th colspan="2"></th> <td colspan="1"></td> <th colspan="2"></th> <td colspan="2"></td> </tr> <tr> <td colspan="13"></td> <th colspan="2"></th> <td colspan="1"></td> <th colspan="2"></th> <td colspan="2"></td> </tr> <tr> <td colspan="14"></td> <th colspan="3"></th> <td colspan="3"></td> </tr> <!-- main body --> <tr> <td colspan="5"></td> <th colspan="13"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="13"></th> <td colspan="2"></td> </tr> <!-- wheels --> <tr> <td colspan="7"></td> <th colspan="2"></th> <td colspan="4"></td> <th colspan="2"></th> <td colspan="5"></td> </tr> <tr> <td colspan="6"></td> <th colspan="4"></th> <td colspan="2"></td> <th colspan="4"></th> <td colspan="4"></td> </tr> <tr> <td colspan="7"></td> <th colspan="2"></th> <td colspan="4"></td> <th colspan="2"></th> <td colspan="5"></td> </tr> </table> </body> </html> What can you draw in tables?! Impress us.

    Read the article

  • My simple PHP is outputting wrong things.

    - by Sergio Tapia
    EDIT: I forgot to add semi colons. Now there is another problems. I'm getting a error: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\useraccess.php on line 12 It outputs: 0){ echo 'si'; } ?> When it should only output 'si' in the body. Here's the code: <html> <head> </head> <body> <? $user = mysql_real_escape_string($_GET["u"]) $pass = mysql_real_escape_string($_GET["p"]) $query = "SELECT * FROM usario WHERE username = '$user' AND password = '$pass'" mysql_connect(localhost, "sergio", "123"); @mysql_select_db("multas") or die( "Unable to select database"); $result=mysql_query($query); if(mysql_numrows($result) > 0){ echo 'si'; } ?> </body> </html>

    Read the article

  • How to do things within a windows service?

    - by Kovu
    Hi, I have an application, written by me in C#.net 2.0 - when the application is opened, a timer will check every 3 seconds for x. If x happens, it shows a warning in a windows form. Is there a possibility to install this timer and the windows form call in a windows-service? So that the timer ticks every time a system is up and shows the message then?

    Read the article

  • Python, SWIG and other strange things

    - by wanderameise
    hey, I have a firmware for an USB module I can already control by visual C. Now I want to port this to python. for this I need the octopus library which is written in c. I found a file called octopus_wrap which was created by SWIG! then I found a makefile which says: python2.5: swig -python -outdir ./ ../octopus.i gcc -fPIC -c ../../liboctopus/src/octopus.c gcc -fPIC -c ../octopus_wrap.c -I /usr/include/python2.5 gcc -fPIC -shared octopus_wrap.o octopus.o /usr/lib/libusb.so -o _octopus.so python2.4: swig -python -outdir ./ ../octopus.i gcc -fPIC -c ../../liboctopus/src/octopus.c gcc -fPIC -c ../octopus_wrap.c -I /usr/include/python2.4 gcc -fPIC -shared octopus_wrap.o octopus.o /usr/lib/libusb.so -o _octopus.so win: gcc -fPIC -c ../../liboctopus/src/octopus.c -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include gcc -fPIC -c octopus_wrap.c -I /c/Python25/libs -lpython25 -I/c/Python25/include -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include gcc -fPIC -shared *.o -o _octopus.pyd -L/c/Python25/libs -lpython25 -lusb -L/c/Programme/libusb-win32-device-bin-0.1.10.1/lib/gcc clean: rm -f octopus* _octopus* install_python2.4: cp _octopus.so /usr/local/lib/python2.4/site-packages/ cp octopus.py /usr/local/lib/python2.4/site-packages/ install_python2.5: cp _octopus.so /usr/local/lib/python2.5/site-packages/ cp octopus.py /usr/local/lib/python2.5/site-packages/ I dont know how to handle this but as far as I can see octopus.py and _octopus.so are the resulting output files which are relevant to python right? luckily someone already did that and so I put those 2 files to my "python26/lib" folder (hope it doesnt matter if it´s python 2.5 or 2.6?!) So when working with the USB device the octopus.py is the library to work with! Importing this file makes several problems: >>> Traceback (most recent call last): File "C:\Users\ameise\My Dropbox\µC\AVR\OCTOPUS\octopususb-0.5\demos\python \blink_status.py", line 8, in <module> from octopus import * File "C:\Python26\lib\octopus.py", line 7, in <module> import _octopus ImportError: DLL load failed: module not found. and here´s the related line 7 : import _octopus So there´s a problem considering the .so file! What could be my next step? I know that´s a lot of confusing stuff but I hope anyone of you could bring some light in my mind! thy in advance

    Read the article

  • Regex to match 2 things in 1 HTML file

    - by CyberK
    Hi, I have a HTML file which contains the following: <img src="MATCH1" bla="blabla"> <something:else bla="blabla" bla="bla"><something:else2 something="something"> <something image="MATCH2" bla="abc"> Now I need a regex to match both MATCH1 and MATCH2 Also the HTML contains multiple parts like this, so it can be in the HTML 1, 2, 3 of x times.. When I say: <img\s*src="(.*?)".*?<something\s*image="(.*?)" It doesn't match it. What am I missing here? Thanks in advance!

    Read the article

  • Top 3 things you miss at StackOverFlow

    - by Marthin
    Hi, To have some fun this fine Saturday in Sweden, I ask you this: What are the top 3 functionality's you think StackOverflow should add? (this is not a debug list) Would be fun to see what people are missing in this great forum. /Marthin

    Read the article

  • Things to do with supercomputer.

    - by BigBoss
    HI, Guys I wanted to create SuperComputer out of my 3 old pcs soon. There are bunch of techniquies available on net for doing this and I will be using one of them. What I would like to get suggestion is what is next !! Many of them suggest some mathematical calculation or some graphic image rendering, which still is to me so boring and not inspiring at all. Please try to suggest something out of box. I would post results of it when I am done. Cheers !

    Read the article

  • UIView animation only animating some of the things I ask it to

    - by Ben
    I have a series of (say) boxes on the screen in a row, all subviews of my main view. Each is a UIView. I want to shift them all left and have a new view also enter the screen from the right in lockstep. Here's what I'm doing: // First add a dummy view offscreen UIView * stagingView = /* make this view, which sets up its width/height */ CGRect frame = [stagingView frame]; frame.origin.x = /* just off the right side of the screen */; [stagingView setFrame:frame]; [self stagingView]; And then I set up animations in one block for all of my subviews (which includes the one I just added): [UIView beginAnimations:@"shiftLeft" context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(_animationDidStop:context:)]; [UIView setAnimationDuration:0.3]; for (UIView * view in [self subviews]) { CGRect frame = [view frame]; frame.origin.x -= (frame.size.width + viewPadding); [view setFrame:frame]; } [UIView commitAnimations]; Here's what I expect: The (three) views already on screen get shifted left and the newly staged view marches in from the right at the same time. Here's what happens: The newly staged view animates in exactly as expected, and the views already on the screen do not appear to move at all! (Or possibly they jump without animation to their end locations). And! If I comment out the whole business of creating the new subview offscreen... the ones onscreen do animate correctly! Huh? (Thanks!)

    Read the article

  • Is this the 'Pythonic' way of doing things?

    - by Sergio Tapia
    This is my first effort on solving the exercise. I gotta say, I'm kind of liking Python. :D # D. verbing # Given a string, if its length is at least 3, # add 'ing' to its end. # Unless it already ends in 'ing', in which case # add 'ly' instead. # If the string length is less than 3, leave it unchanged. # Return the resulting string. def verbing(s): if len(s) >= 3: if s[-3:] == "ing": s += "ly" else: s += "ing" return s else: return s # +++your code here+++ return What do you think I could improve on here?

    Read the article

  • Optimize code performance when odd/even threads are doing different things in CUDA

    - by Orion Nebula
    Hi all! I have two large vectors, I am trying to do some sort of element multiplication, where an even-numbered element in the first vector is multiplied by the next odd-numbered element in the second vector .... and where the odd-numbered element in the first vector is multiplied by the preceding even-numbered element in the second vector Ex. vector 1 is V1(1) V1(2) V1(3) V1(4) vector 2 is V2(1) V2(2) V2(3) V2(4) V1(1) * V2(2) V1(3) * V2(4) V1(2) * V2(1) V1(4) * V2(3) I have written a Cuda code to do this: (Pds has the elements of the first vector in shared memory, Nds the second Vector) //instead of using %2 .. i check for the first bit to decide if number is odd/even -- faster if ((tx & 0x0001) == 0x0000) Nds[tx+1] = Pds[tx] * Nds[tx+1]; else Nds[tx-1] = Pds[tx] * Nds[tx-1]; __syncthreads(); Is there anyway to further accelerate this code or avoid divergence ? Thanks

    Read the article

  • "Hiding" things in GIT

    - by bobobobo
    Git noob here. I know this is against the principal of "distributed source control" but I want to "password protect" certain development branches in my GIT repository. That is, I don't want that branch to be available via git branch -r, except to a certain group of developers who need access to that branch, via some sort of password. Possible?

    Read the article

  • Using string.Format for simple things?

    - by Gerrie Schenck
    In my early .Net programming days, I used string.Format() only for complex string concatenations, for example to compile strings as Problem with customer order 234 of date 2/2/2002 and payment id 55543. But now I use string.Format for almost every string concatenation I have to do, also simple ones such as prefixing a string with something. Console.WriteLine(string.Format("\t\t{0}", myString)); Is there any possible overhead on this? Maybe I should use the regular + operator to do these simple operations? What's your opinion on this?

    Read the article

  • Optimize code perfromance when odd/even threads are doing different things in CUDA

    - by Ashraf
    Hi all! I have two large vectors, I am trying to do some sort of element multiplication, where an even-numbered element in the first vector is multiplied by the next odd-numbered element in the second vector .... and where the odd-numbered element in the first vector is multiplied by the preceding even-numbered element in the second vector Ex. vector 1 is V1(1) V1(2) V1(3) V1(4) vector 2 is V2(1) V2(2) V2(3) V2(4) V1(1) * V2(2) V1(3) * V2(4) V1(2) * V2(1) V1(4) * V2(3) I have written a Cuda code to do this: (Pds has the elements of the first vector in shared memory, Nds the second Vector) //instead of using %2 .. i check for the first bit to decide if number is odd/even -- faster if ((tx & 0x0001) == 0x0000) Nds[tx+1] = Pds[tx] * Nds[tx+1]; else Nds[tx-1] = Pds[tx] * Nds[tx-1]; __syncthreads(); Is there anyway to further accelerate this code or avoid divergence .. Thanks

    Read the article

  • MySQL: Count two things in one query?

    - by Nebs
    I have a "boolean" column in one of my tables (value is either 0 or 1). I need to get two counts: The number of rows that have the boolean set to 0 and the number of rows that have it set to 1. Currently I have two queries: One to count the 1's and the other to count the 0's. Is MySQL traversing the entire table when counting rows with a WHERE condition? I'm wondering if there's a single query that would allow two counters based on different conditions? Or is there a way to get the total count along side the WHERE conditioned count? This would be enough as I'd only have to subtract one count from the other (due to the boolean nature of the column). There are no NULL values. Thanks.

    Read the article

  • Python constructor does weird things with optional parameters

    - by christangrant
    Can you help me understand of the behaviour and implications of the python __init__ constructor. It seems like when there is an optional parameter and you try and set an existing object to a new object the optional value of the existing object is preserved and copied. Ok that was confusing... so look at an example I concocted below. In the code below I am trying to make a tree structure with nodes and possibly many children . In the first class NodeBad, the constructor has two parameters, the value and any possible children. The second class NodeGood only takes the value of the node as a parameter. Both have an addchild method to add a child to a node. When creating a tree with the NodeGood class, it works as expected. However, when doing the same thing with the NodeBad class, it seems as though a child can only be added once! The code below will result in the following output: Good Tree 1 2 3 [< 3 >] Bad Tree 1 2 2 [< 2 >, < 3 >] Que Pasa? Here is the Example: #!/usr/bin/python class NodeBad: def __init__(self, value, c=[]): self.value = value self.children = c def addchild(self, node): self.children.append(node) def __str__(self): return '< %s >' % self.value def __repr__(self): return '< %s >' % self.value class NodeGood: def __init__(self, value): self.value = value self.children = [] def addchild(self, node): self.children.append(node) def __str__(self): return '< %s >' % self.value def __repr__(self): return '< %s >' % self.value if __name__ == '__main__': print 'Good Tree' ng = NodeGood(1) # Root Node rootgood = ng ng.addchild(NodeGood(2)) # 1nd Child ng = ng.children[0] ng.addchild(NodeGood(3)) # 2nd Child print rootgood.value print rootgood.children[0].value print rootgood.children[0].children[0].value print rootgood.children[0].children print 'Bad Tree' nb = NodeBad(1) # Root Node rootbad = nb nb.addchild(NodeBad(2)) # 1st Child nb = nb.children[0] nb.addchild(NodeBad(3)) # 2nd Child print rootbad.value print rootbad.children[0].value print rootbad.children[0].children[0].value print rootbad.children[0].children

    Read the article

  • Python - Things I shouldn't be doing?

    - by cornjuliox
    I've got a few questions about best practices in Python. Not too long ago I would do something like this with my code: ... junk_block = "".join(open("foo.txt","rb").read().split()) ... I don't do this anymore because I can see that it makes code harder to read, but would the code run slower if I split the statements up like so: f_obj = open("foo.txt", "rb") f_data = f_obj.read() f_data_list = f_data.split() junk_block = "".join(f_data_list) I also noticed that there's nothing keeping you from doing an 'import' within a function block, is there any reason why I should do that?

    Read the article

  • Select back things that _don't_ exist

    - by bobobobo
    I have this table. I want to select back the items that don't exist already, so I can create them. table tags +---------+-------+ | tagId | name | | 1 | C | | 2 | DX | | 3 | CG | Say SQL looks like: select name from tags where name in ( 'C', 'CG', 'RX' ) You get back 'C' and 'CG', so you know you have to create 'RX'. Is there a way to get a MySQL statement like this to return 'RX' instead, when 'RX' doesn't already exist?

    Read the article

  • C++ Draw things on riched32.dll

    - by genesys
    Hi! I'm using riched32.dll to display and edit rich text. now I would like to draw some custom markings to the text, like for example the red underline in office word displaying wrong spelling. or text marking boxes with rounded corners or something like this. Of course those markings should scroll properly with the text. How can I do that? Thanks!

    Read the article

  • crazy things with PHP array...

    - by user296516
    Hi, A very strange thing, I have an array where element 7 is '[1000137d]', but when I try to compare it by using if ( $array[7] == '[1000137d]' ) it will return a negative. echo $array[7]; echo '<br>'; echo '[1000137d]'; echo '<br>'; echo md5($array[7]); echo '<br>'; echo md5('[1000137d]'); this code would echo out: [1000137d] [1000137d] ca9983334e720042e3a6cbb1dd6b7fd2 3b1c21e661bd7d38deda1f4a45eaa23b as you can see $array[7] is identical to [1000137d], yet their md5's differ. what do you think might be the problem? Thanks!

    Read the article

  • OpenMP - running things in parallel and some in sequence within them

    - by Sayan Ghosh
    Hi, I have a scenario like: for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { for (k = 0; k < x; k++) { val = 2*i + j + 4*k if (val != 0) { for(t = 0; t < l; t++) { someFunction((i + t) + someFunction(j + t) + k*t) } } } } } Considering this is block A, Now I have two more similar blocks in my code. I want to put them in parallel, so I used OpenMP pragmas. However I am not able to parallelize it, because I am a tad confused that which variables would be shared and private in this case. If the function call in the inner loop was an operation like sum += x, then I could have added a reduction clause. In general, how would one approach parallelizing a code using OpenMP, when we there is a nested for loop, and then another inner for loop doing the main operation. I tried declaring a parallel region, and then simply putting pragma fors before the blocks, but definitely I am missing a point there! Thanks, Sayan

    Read the article

  • ede-proj-regenerate does weird things with my Makefile

    - by Xavier Maillard
    Hi, I have created a really basic project (Make) like this: (ede-proj-project "zrm" :name "zrm" :file "Project.ede" :targets (list (ede-proj-target-makefile-program "zm" :name "zrm" :path "" :source '("zrm.c") ) ) ) When doing M-x ede-proj-regenerate RET and M-x compile RET RET (accepting make -k as my compile command), make keeps bailing with a **missing separator error. When editing my Makefile outside of Emacs (with the darn evil vi) and replacing spaces by tabs, it works. Is there anything special I should pay attention in order to have this work ? Regards

    Read the article

  • Android - Making an activity display different things depending on what is clicked

    - by user3682017
    I have a listview that is populated by an arraylist of classes. public void populateThingsList(){ listExample.add(new Example("Example name", 1, "Example detail 1", "Example detail 2", R.drawable.1_icon, "Example detail 3")); listExample.add(new Example("Example name1", 2, "Example detail 1", "Example detail 2", R.drawable.2_icon, "Example detail 3")); listExample.add(new Example("Example name2", 3, "Example detail 1", "Example detail 2", R.drawable.3_icon, "Example detail 3")); listExample.add(new Example("Example name3", 4, "Example detail 1", "Example detail 2", R.drawable.4_icon, "Example detail 3")); listExample.add(new Example("Example name4", 5, "Example detail 1", "Example detail 2", R.drawable.5_icon, "Example detail 3")); listExample.add(new Example("Example name5", 6, "Example detail 1", "Example detail 2", R.drawable.6_icon, "Example detail 3")); listExample.add(new Example("Example name6", 7, "Example detail 1", "Example detail 2", R.drawable.7_icon, "Example detail 3")); listExample.add(new Example("Example name7", 8, "Example detail 1", "Example detail 2", R.drawable.8_icon, "Example detail 3")); listExample.add(new Example("Example name8", 9, "Example detail 1", "Example detail 2", R.drawable.9_icon, "Example detail 3")); listExample.add(new Example("Example name9", 10, "Example detail 1", "Example detail 2", R.drawable.10_icon, "Example detail 3")); } This is the code for the clicklistener. ListView list = (ListView) findViewById(R.id.exampleListView); list.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Example clickedexample = listExample.get(position); startActivity(new Intent("com.example.app.EXAMPLEACTIVITY")); } } Is there any way I can get the information from clickedExample and set the textViews and imageView in ExampleActivity depending on which one was clicked?

    Read the article

  • Write a few things to a session in cakephp

    - by kwokwai
    Hi all, I am learning Session function in CakePhp, and see some examples like this on cakePHP cookBook web site: For example: write($mysession1, 'testing') I am not sure if a session can only hold up a particular thing in it. Is it possible to write an array to a session like: mysession[0] = 'Testing0'; mysession[1] = 'Testing1'; mysession[2] = 'Testing2';

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >