Search Results

Search found 2210 results on 89 pages for 'stupid phil'.

Page 57/89 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • Sockets: RAW or STREAM

    - by user1415536
    May be the question is a bit stupid, but I'll ask it. I read a lot about raw sockets in network, have seen several examples. So, basically with raw sockets it's possible to build own stack of headers, like stack = IP + TCP/UDP + OWN_HEADER. My question is, is it possible to get some kind of ready frame of first two(IP + TCP/UDP) from the linux kernel and then just append own header to them? The operating system in question is linux and the language is C. I cannot find any function which can do such a thing, but may be I'm digging in a wrong direction.

    Read the article

  • Most Efficient way to set Register to 1 or (-1)

    - by Bob
    I am taking an assembly course now, and the guy who checks our home assignments is a very pedantic old-school optimization freak. For example he deducts 10% if he sees: mov ax, 0 instead of: xor ax,ax even if it's only used once. I am not a complete beginner in assembly programing but I'm not an optimization expert, so I need your help in something (might be a very stupid question but I'll ask anyway): if I need to set a register value to 1 or (-1) is it better to use: mov ax, 1 or do something like: xor ax,ax inc ax I really need a good grade, so I'm trying to get it as optimized as possible. ( I need to optimize both time and code size)

    Read the article

  • ajax page works in development (vs2010) but does a full postback on production win2k8R2

    - by merk
    Hi all, I have a stupid simple page. I've got a panel and a button. Clicking the button either hides or displays the panel. That much works. I added in a script manager control and update panel - put all the page contents in the updatepanel/contenttemplate When i run this under vs2010 and click the button, the page does NOT post back - the panel just appears or disappears without the whole page refreshing, which is what i wanted. I upload this to my IIS7.5 server and the page is posting back/whole page is refreshing when i click the button. Do i need to configure anything on the server to enable ajax? thanks

    Read the article

  • Getting fields of a class through reflection

    - by Water Cooler v2
    I've done it a gazillion times in the past and successfully so. This time, I'm suffering from lapses of amnesia. So, I am just trying to get the fields on an object. It is an embarrassingly simple and stupid piece of code that I am writing in a test solution before I do something really useful in production code. Strangely, the GetFieldsOf method reports a zero length array on the "Amazing" class. Help. class Amazing { private NameValueCollection _nvc; protected NameValueCollection _myDict; } private static FieldInfo[] GetFieldsOf(string className, string nameSpace = "SomeReflection") { Type t; return (t = Assembly.GetExecutingAssembly().GetType( string.Format("{0}.{1}", nameSpace, className) )) == null ? null : t.GetFields(); }

    Read the article

  • initializing properties with private sets in .Net

    - by Martin Neal
    public class Foo { public string Name { get; private set;} // <-- Because set is private, } void Main() { var bar = new Foo {Name = "baz"}; // <-- This doesn't compile /*The property or indexer 'UserQuery.Foo.Name' cannot be used in this context because the set accessor is inaccessible*/ using (DataContext dc = new DataContext(Connection)) { // yet the following line works. **How**? IEnumerable<Foo> qux = dc.ExecuteQuery<Foo>( "SELECT Name FROM Customer"); } foreach (q in qux) Console.WriteLine(q); } I have just been using the private modifier because it works and kept me from being stupid with my code, but now that I need to create a new Foo, I've just removed the private modifier from my property. I'm just really curious, why does the ExecuteQuery into an IEnumerable of Foo's work?

    Read the article

  • About This Code

    - by the-ifl
    Hi Guys , well I have a simple and a stupid question !! in this code what is the role of the symbol "%3d"...I Now That % mean refer To Variable ...... This is The Code : #include <stdio.h> int main(void) { int t, i, num[3][4]; for(t=0; t<3; ++t) for(i=0; i<4; ++i) num[t][i] = (t*4)+i+1; /* now print them out */ for(t=0; t<3; ++t) { for(i=0; i<4; ++i) printf("%3d ", num[t][i]); printf("\n"); } return 0; }

    Read the article

  • Conventional Approaches for Passing Data to Back-End?

    - by Calvin
    Hi guys, I'm fairly new to web development, so please pardon the painfully newbie question that's about to follow. My computer science class group and I are developing a web application for class, which is built in Python (under Django) and uses jQuery on the front end. It's primarily an AJAX-ified application, and passing data from the backend to the front end is done through AJAX calls to specific URLs which return JSON. This is probably a stupid question, but what's the conventional approach for passing data in the opposite direction? We don't want to reload the page or anything, so is it an AJAX pass going the other way or something? Thanks in advance for your help!

    Read the article

  • Class-Dump Installation

    - by sj-dev
    So this may sound like a really stupid question and I HAVE looked at the how-to from the parent website, but no matter what I do, I cannot get this program to even start to install... I tried entering: cd /opt/local/bin/portslocation/dports/class-dump which returned a "this file/director doesnt exist" error, so i tried to get to it folder by folder. when i got all the way to: cd /opt/local/bin/ i cannot go any further. when i check the contents of the bin directory, the only files i can find are (and i cannot access these apparently either): "daemondo port portf portindex portmirror" i have tried doing this on 2 computers so far to no avail, macports is installed on both like the website said and i am having trouble finding any support for it. please and thank you!!

    Read the article

  • menuitem id in xml format can't be an integer? huh. really?

    - by misbell
    ok, in menu.add, you add an integer menuitem id. But when you specify the menu in xml, @+id can't take an integer, so you can't test the id for the menu item as an integer in a switch statement. What obvious thing am I missing, because surely an inconsistency this bone-stupid couldn't have passed muster with all those wonderful geniuses at Google. on top of that, when I give the menu item a name like "@+id/myMenuItem", item.getItemId() returns an integer, a long one, which I guess is a representation of the hex pointer. M

    Read the article

  • Can NSUserDefaults be used for pausing the application during a phone call ?

    - by Anil Kumar
    Friends, currently I dont have iphone to test and using Simulator for testing purposes. I am Just curious to know whether an application continues to run even after a phone call.. here i have no option to test this from simulator. If it terminates then how can i pause things.. and continue after a phone call. Is NSUserDefaults can be used for my case. As far I understood NSuserDefaults are used to store data that is required when the App is next time loaded. But here I dont want my App to terminate instead pause until Call ends and continue as uninterrupted later. Please clear me about this. Sorry I am still a beginner so I request for no harsh replies if my question looks stupid. Thanks in Advance

    Read the article

  • android dialog transparant

    - by Doomic
    It is a simple stupid question, but i cant find any info on the web. I have an android app with a custom dialog. The dialog has the default grey 1px border. But it also has a black border around that grey line. I want to remove the black part. the dialog is made in xml and i call: dialog.setContentView(R.layout.xxxxx); as soon as i do that the black border is there. However the xml has not a background color set. also a transparant color in the xml doesn't helps. if i do not call setcontentview. then a small dialog appears but without a strange border.

    Read the article

  • Opinions regarding C++ programming practice

    - by Sagar
    I have a program that I am writing, not too big. Apart from the main function, it has about 15 other functions that called for various tasks at various times. The code works just fine all in one file, and as it is right now. However, I was wondering if anyone had any advice on whether it is smarter/more efficient/better programming to put those functions in a separate file different from where main is, or whether it even matters at all. If yes, why? If no, why not? I am not new at C++, but definitely not an expert either, so if you think this question is stupid, feel free to tell me so. Thanks for your time!

    Read the article

  • How do I run an XSLT file?

    - by Eric
    Alright this seems like a stupid question but I can't figure it out. I'm writing an XSLT file to translate an XML document into an XHTML document. I've used both Visual Studio and XML Notepad 2007 to preview the results of my XSLT file, but now I want to actually write out a real XHTML file so I can see how it looks in other browsers. Neither Visual Studio or XML NotePad have an obvious way to save the preview. Am I missing something. Obviously the file is getting created because something is being previewed, but I need to know where that file is being created or better yet choose its location.

    Read the article

  • authorization services question cocoa

    - by Marius
    Sorry for being a total beginner in cocoa and for asking the following stupid question, but it's too confusing for me to google it myself or maybe i'm just missing something. I need to run a shellscript with elevated privileges in cocoa. As i understand, "AuthorizationExecuteWithPrivileges" is the correct way to do it. So i've created an application and tried to use some code from one example i found online. The problem is ... if i understand it correctly ... there should be a Security framework in /System/Library/Frameworks that i have to import to the project, but ... it's not there. What am i missing here? Thank you.

    Read the article

  • How to get global access to enum types in C#?

    - by lala
    This is probably a stupid question, but I can't seem to do it. I want to set up some enums in one class like this: public enum Direction { north, east, south, west }; Then have that enum type accessible to all classes so that some other class could for instance have: Direction dir = north; and be able to pass the enum type between classes: public void changeDirection(Direction direction) { dir = direction; } I thought that setting the enum to public would make this automatically possible, but it doesn't seem to be visible outside of the class I declared the enum in.

    Read the article

  • iPhone - a question about @property

    - by Roger
    Hi, I am kind of newbie on Objective-C and I was looking at a code, trying to understand a few things, and I come across with this .h file: there was a declaration like that on the @interface section MyVideoClass *contrast_; then below we have @property (nonatomic, retain) MyVideoClass *contrast; @property (nonatomic, retain) FetchClass *fetchMe; The strange part is that the first has an underscrore after the name and the second one, doesn't. The other strange thing is that the guy has a call to these properties like this: FetchClass *fetchOne = [self.fetchMe contrast]; What kind of call is that? This seems pretty insane to me. I simply cannot understand what is going on here, but the code works. pretty insane. Can you guys explain me that? Forgive the stupid question, but I am still learning... thanks

    Read the article

  • JAVA-I don't want clicking on my app make other apps lose focus

    - by Auxiliary
    Wow, what a stupid question you might say. But is it possible? I have a mouse move event in a Jpanel and it works even when the application is not in focus, now can I have something like that for the clicking event or something similar. And most importantly I don't want other apps (even something like the main menu) to lose focus when i click on my app. I was the system's event queue but i'm not sure where that would lead me to. Thanks in advance.

    Read the article

  • [solved] What's wrong with this jQuery example?

    - by Sven Larson
    The following jQuery example should put some text into the div, but it doesn't. I tried Firefox, Google Chrome and Internet Explorer. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" language="javascript"></script> <script language="javascript"> $(window).load(function() { $('adiv').html('<p>hello world</p>'); alert('done'); }); </script> </head> <body> <div id="adiv"> </div> </body> </html> Sorry, this might be stupid, but I'm stuck.

    Read the article

  • Drupal 6: pre-defined variable for amount [count] of custom type items...

    - by artmania
    Hi friends, I'm a drupal newbie... I researched but couldnot find :/ is there any predefined variable that gives my CCK field value count? for example; I have field_logo_sponsor and I need to display all logo items. Now I have 5 item <?php print $node->field_logo_sponsor[0]['view'] ?> <?php print $node->field_logo_sponsor[1]['view'] ?> <?php print $node->field_logo_sponsor[2]['view'] ?> <?php print $node->field_logo_sponsor[3]['view'] ?> <?php print $node->field_logo_sponsor[4]['view'] ?> it is stupid to use it that way :/ if there is any count variable for that, I will just create a loop for that and display them in a for or while loop Appreciate helps! thanks a lot!

    Read the article

  • two android threads and not synchronized data

    - by Sponge
    i have a (perhaps stupid) question: im using 2 threads, one is writing floats and one is reading this floats permanently. my question is, what could happen worse when i dont synchronize them? it would be no problem if some of the values would not be correct because they switch just a little every write operation. im running the application this way at the moment and dont have any problems so i want to know what could happen worse? a read/write conflict would cause a number like 12345 which is written to 54321 and red at the same time appear for example as 54345 ? or could happen something worse? (i dont want to use synchronization to keep the code as fast as possible)

    Read the article

  • Premium Services - Ad blocker legal or illegal?

    - by René
    Ok, maybe thats kind of a stupid question. But let's try to get an answer. I'm building a Desktop Solution for an existing web service. That web service is only available without ads when you pay for a premium account. Would it be illegal when I block this ads in my Desktop Application? When you use this web service over the browser, every user has the chance to block ads with adblocker addons. So why not block this stuff in my Desktop Application?

    Read the article

  • Generating Ant build file for a project in eclipse

    - by Negai
    Hi everyone. I have a project written in Java using eclipse and I would like to generate an Ant build file for it. How can it be done? I constantly need to keep it synchronized with the source code, so that I could promote it along with the code to the common repository when with the project structure is modified. I'm sorry for a stupid question like this. I've browsed across the forums, but still no luck. Thanks in advance.

    Read the article

  • Maven Grails web.xml

    - by dunn less
    Might be a stupid question, but in my current maven project i do not have a web.xml in my /web-app/WEB-INF folder. There is no web-xml in my project and never has been, im trying to add it but my application is non-responsive to anything written in the web.xml. What am i missing?, iv tried specifying the path to it through the config.groovy like: grails.project.web.xml="web-app/WEB-INF/web.xml" Am i missing something? Do i need to specify the web.xml in some other config file in order to make my project utilize it ?

    Read the article

  • is there an easy way to convert jquery code to javascript?

    - by davidsleeps
    hopefully the question doesn't sound stupid, but there are lots of examples out there of achieving certain things in javascript/dom using jQuery. Using jQuery is not always an option (or even a want) which can make understanding the examples of javascript solutions written in jQuery hard. Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code... edit (future readers): pretend there is a logical reason why jQuery isn't available! edit (almost 3 years since I asked this): there is no logical reason why jQuery isn't available :P

    Read the article

  • How to implement dual communication between server and client via http

    - by Alex Sebastiano
    I have a AJAX client which must receive messages from server. Some messages from server not like request-response type. For example, imaging game in which players can enter. Server must send to client info about player entering. But how can server send message to client via http without request from client? Only decision that i can invent: client send request to server (getNewPlayerEnter request) with big timeout, server checks state of player set, if in set new players are, then server send info to client, if not server 'sleeps' on some time, and after 'sleeping' server checks players set again. I think my desicion a little stupid(maybe not little). How implement it right? p.s. sorry for my english

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >