Daily Archives

Articles indexed Thursday March 17 2011

Page 7/12 | < Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Connman not connecting to internet

    - by sagarchalise
    I wanted to try connman as I heard it will be replacing network manager. I kinda liked its looks and feel but the problem is I donot get connected to internet. I am using ADSL and it connects to my adsl router but doesnot ping google or any other sites. I tried to change the default gateway as well as use static ips but to no avail. It displays I am wired but doesnot open any sites or ping to any external sites except for 198.168.1.1 which is my router ip. Can anyone help ? Basically it is doing alright with network-manager as well as wicd

    Read the article

  • Board Game Design in Cocos2d

    - by object2.0
    Hi folks i am going to start a chess like board game. and for that i have reviewed a number to things available. one is http://www.mapeditor.org/ , using which you can create a grid base games. another option is geekgameboard for iphone available at http://mooseyard.lighthouseapp.com/projects/23201-geekgameboard now i want your expert opinion that would it be better to make a game in cocos2d using the first option or the second option? both looks promising to me and give good control over board design. ps: sorry for duplicates, i found about the http://gamedev.stackexchange.com/ lately after posting it on stackexchange. so i am just posting it here again as i feel its more relevant board.

    Read the article

  • To sell or give for free

    - by QAH
    Hello everyone! I am currently making a game that I was originally planning to sell. It is a simple 2D arcade style game for the PC. I've seen many indie games become popular and generate revenue from advertisements, but the game itself remains free. I need some advice on whether or not I should sell my game, release it for free with advertisements, or ask for donations and keep the game free. I feel that my game is fun, but of course the graphics aren't tip top because I am a programmer, not an artist. I just take screenshots of 3D models I get from Turbosquid and crop around it to make a sprite. Also, and I could be very wrong about this, it seems that there are more legal issues surrounding selling a game than making it free and generating revenue from advertisement, or asking for donations. If I am wrong, someone please correct me. Also, I am very interested in generating some revenue for my work, but that isn't at the very top of my list. I am in my last year of high school, soon to be going to college, and I am going to major in computer science/software engineering. So I am trying to gain some preliminary experience at home by coding stuff every day. One way of getting this experience is by making this game. So what do you think? What route should I take? What has worked well with other indie games? Thanks in advance.

    Read the article

  • Change user control appearance based on state

    - by John
    I have a user control that consists of four overlapping items: 2 rectangles, an ellipse and a lable <UserControl x:Class="UserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="50.1" Height="45.424" Background="Transparent" FontSize="24"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="3.303*" /> <RowDefinition Height="40*" /> <RowDefinition Height="2.121*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="5.344*" /> <ColumnDefinition Width="40.075*" /> <ColumnDefinition Width="4.663*" /> </Grid.ColumnDefinitions> <Rectangle Name="Rectangle1" RadiusX="5" RadiusY="5" Fill="DarkGray" Grid.ColumnSpan="3" Grid.RowSpan="3" /> <Ellipse Name="ellipse1" Fill="{Binding State}" Margin="0.016,0.001,4.663,0" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Stroke="Black" IsEnabled="True" Panel.ZIndex="2" /> <Label Name="lblNumber" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" FontWeight="Bold" FontSize="24" Grid.Column="1" Grid.Row="1" Padding="0" Panel.ZIndex="3">9</Label> <Rectangle Grid.Column="1" Grid.Row="1" Margin="0.091,0,4.663,0" Fill="Blue" Name="rectangle2" Stroke="Black" Grid.ColumnSpan="2" Panel.ZIndex="1" /> </Grid> Here is my business object that I want to control the state of my user control: Imports System.Data Imports System.ComponentModel Public Class BusinessObject Implements INotifyPropertyChanged 'Public logger As log4net.ILog Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged Private _state As States Public Enum States State1 State2 State3 End Enum Public Property State() As States Get Return _state End Get Set(ByVal value As States) If (value <> _state) Then _state = value RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("State")) End If End Set End Property Protected Sub OnPropertyChanged(ByVal name As String) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(name)) End Sub I want to be able to change the state of a business object in the code behind and have that change the colors of multiple shapes in my usercontrol. I'm not sure about how to do the binding. I set the datacontext of the user control in the code behind but not sure if that's right. I'm new to WPF and programming in general and I'm stuck on where to go from here. Any recommendations would be greatly appreciated!!

    Read the article

  • iPhone, how to dyanmic create new entity (table) via core data model?

    - by Robin
    as topic, I just want create new Entity(table) in sqlite , my code as follows: +(BOOL)CreateDataSet:(NSManagedObjectModel *) model attributes:(NSDictionary*)attributes entityName:(NSString*) entityName { NSEntityDescription *entityDef = [[NSEntityDescription alloc] init]; [entityDef setName:entityName]; [entityDef setManagedObjectClassName:entityName]; [model setEntities:[NSArray arrayWithObject:entityDef]]; //@step NSArray *properties = [CoreDataHelper CreateAttributes:attributes]; [entityDef setProperties:properties]; [entityDef release]; return TRUE; } but it throw errors: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't modify an immutable model.' * Call stack at first throw: ( 0 CoreFoundation 0x01c5abe9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x01daf5c2 objc_exception_throw + 47 2 CoreData 0x0152634a -[NSManagedObjectModel(_NSInternalMethods) _throwIfNotEditable] + 106 3 CoreData 0x01526904 -[NSManagedObjectModel setEntities:] + 36 .... that seem show the model is read only..... anyone can help on this problem? thanks

    Read the article

  • possible to use jquery to skip to a certain part of a page, based on its div class?

    - by Brad
    I want a link that scrolls the page to the start of the <div class="content-body"> The same functionality as a: <a href="#maincontent">Skip</a>, and placing <a name="maincontent"></a> right next to <div class="content-body"> I am seeing if it is possible via jQuery, and want to know if I would run into any problems down the road using that method (besides the user having javascript disabled).

    Read the article

  • How can I identify an element from a list within another list

    - by Alex
    I have been trying to make a block of code that finds the index of the largest bid for each item. Then I was going to use the index as a way to identify the person who paid that much moneys name. However no matter what i try I can't link the person and what they have gained from the auction together. Here is the code I have been writing: It has to be able to work with any information inputted def sealedBids(): n = int(input('\nHow many people are in the group? ')) z = 0 g = [] s = [] b = [] f = [] w = []#goes by number of items q = [] while z < n: b.append([]) z = z + 1 z = 0 while z < n: g.append(input('Enter a bidders name: ')) z = z + 1 z = 0 i = int(input('How many items are being bid on?')) while z < i: s.append(input('Enter the name of an item: ')) w.append(z) z = z + 1 z = 0 for j in range(n):#specifies which persons bids your taking for k in range(i):#specifies which item is being bid on b[j].append(int(input('How much money has {0} bid on the {1}? '.format(g[j], s[k])))) print(' ') for j in range(n):#calculates fair share f.append(sum(b[j])/n) for j in range(i):#identifies which quantity of money was the largest for each item for k in range(n): if w[j] < b[k][j]: w[j] = b[k][j] q.append(k) any advice is much appreciated.

    Read the article

  • Flex Filterfunction - Filter by Array of values

    - by Anandh
    How to filter an Arraycollection by "array of values" rather than a single value (simple comparision) , the below code snippet is for filtering by single value now I went into scenario like filter out only price [10,4,1,8] (some random values from the master collection). Is there any better way to do the second code snippet Filter function simple comparision private function filterForTestData(item:Object):Boolean{ if(item.price < slider.value) return true; else return false; } Filter by array of values private function filterForTestData(item:Object,filterBy:Array= [10,4,1,8]):Boolean{ for(randomprice in filterBy) return item.price == randomprice; } [Edited] Apply Filter testData.filterFunction = filterForTestData;

    Read the article

  • Login screen using user custom control

    - by Mocco
    Hi, I have followed some advices I got here today and would need a bit more help now: I have an user control with login logic. In mainForm I am using this: private void Form1_Load(object sender, EventArgs e) { LoginScreen login = new MainMenu(); login.Parent = this; login.Dock = DockStyle.Fill; login.Show(); } But I guess it is not modal and thus does not stop the original Form application. Sure I would need the main Form to do not continue until the login form is closed (and login sucessfull). Would using an event correct? Let login object to raise an event that login was successfull and let the MainForm handle it - run the app?

    Read the article

  • XSL match some but not all

    - by Willb
    I have a solution from an earlier post that was kindly provided by Dimitre Novatchev. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="my:my"> <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:key name="kPhysByName" match="KB_XMod_Modules" use="Physician"/> <xsl:template match="/"> <result> <xsl:apply-templates/> </result> </xsl:template> <xsl:template match="/*/*/*[starts-with(name(), 'InfBy')]"> <xsl:variable name="vCur" select="."/> <xsl:for-each select="document('doc2.xml')"> <xsl:variable name="vMod" select="key('kPhysByName', $vCur)"/> <xsl:copy> <items> <item> <label> <xsl:value-of select="$vMod/Physician"/> </label> <value> <xsl:value-of select="$vMod/XModID"/> </value> </item> </items> </xsl:copy> </xsl:for-each> </xsl:template> </xsl:stylesheet> I now need to use additional fields in my source XML and need the existing labels intact but I'm having problems getting this going. <instance> <NewTag>Hello</newTag1> <AnotherNewTag>Everyone</AnotherNewTag> <InfBy1>Dr Phibes</InfBy1> <InfBy2>Dr X</InfBy2> <InfBy3>Dr Chivago</InfBy3> </instance> It drops the additional labels and outputs <result xmlns:my="my:my"> HelloEveryone <items> <item> <label>Dr Phibes</label> <value>60</value> </item> </items> ... I've been experimenting a lot with <xsl:otherwise> <xsl:copy-of select="."> </xsl:copy-of> </xsl:otherwise> but being an xsl newbie I can't seem to get this to work. I've a feeling I'm barking up the wrong tree! Does anyone have any ideas? Thanks, Will

    Read the article

  • Upload and parse csv file with "universal newline" in python on Google App Engine

    - by greg
    Hi, I'm uploading a csv/tsv file from a form in GAE, and I try to parse the file with python csv module. Like describe here, uploaded files in GAE are strings. So I treat my uploaded string a file-like object : file = self.request.get('catalog') catalog = csv.reader(StringIO.StringIO(file),dialect=csv.excel_tab) But new lines in my files are not necessarily '\n' (thanks to excel..), and it generated an error : Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode? Does anyone know how to use StringIO.StringIO to treat strings like files open in universal-newline?

    Read the article

  • Placeholder for UITextView

    - by Gill Bates
    Anyone ever implements something in UITextView that stopping it from receiving future inputs when the text length is smaller than certain threshold? I plan to implement a textview like we have in the mail composer interface. We have a placeholder "Subject" there, and the cursor starts after. Placeholder in UITextView Inspired from this question, I wonder if there are some methods which could be used to stop changing the text in the UITextView once the cursor is moving back to the placeholder string. Any ideas?

    Read the article

  • C++ DLL which can inform a calling program about its progress

    - by Felix Dombek
    My boss wants me to write a DLL in C++ (MSVC++2010) which can perform a Volume Shadow Copy which he can call from VB6 (or at a later point other languages) and which can give status updates back while it is not finished. He calls it "events". I have the feeling that I finally need to learn COM (I'd rather not ...) ... also, a callback function comes to my mind, but it's surely impossible to hand over function pointers from VB6 to C++? Can someone outline what I have to learn and how this can be accomplished, with or without COM?

    Read the article

  • How to decomment an html/php webpage?

    - by Sam
    A crazy question: Imagine a webpage file called somepage.php And it contains some html php contents in my editor I see: <html><head></head><body> <?=$welcome . $essay . $thatsAllForNowFolks . $footer ?> <!-- Blue Ball Bell Blow Bows Bats Beef Bark Bill Boss --> </body></html> When I browse my site I see those comments in the final result, while I only want that comment to be only in my editor for my secretive inspirations and don't want the whole world to know what I'm thinking when I'm developing, as well as I see those comments for any and all my website visitors as wasted bandwitch of internet speed. How do I decomment my entire html/php files at the moment the html is served? Ideas, code and suggestions are much appreciated. My thanks in advance...

    Read the article

  • Auto submit form on clicking specific dropdown - jquery

    - by blasteralfred
    Hi, I have a form like below <form name="testform" id="testform" action="test.php" method="get"> <input name="field1" id="field1" type="text" value=""> <input name="field2" id="field2" type="text" value=""> <select name="dropdown" id="dropdown"> <option value="option1" selected="selected">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> </select> <input type="submit" name="Submit" value="Submit" id="Submit"> </form> I want to submit the form automatically when someone click (or select) an option from the dropdown. How can I make this possible using jquery or something else or simple js. Thanks in advance... :) blasteralfred

    Read the article

  • Is there any injection vunerability in the body of an email?

    - by Brett
    Hey guys..... AFAIK there is only a vulnerability within the HEADERS of an email when using user data correct? I am using the below function to sanitize my data, however I have some textarea fields on the page & hence these may contain linebreaks.. so was wondering if that user data is only going to be put in the body of the email, can it not bother with being sanitized - apart from stripping html of course? Here is the function: function is_injected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if (preg_match($inject,$str)) { return true; } else { return false; } } As a side note, surprised there wasn't currently a tag for mail-injection / email-injection. Thanks!

    Read the article

  • SL4 - Binding DataGridTextColumn to a property

    - by Brent
    I have a DataGrid. In the DataGrid's AutoGeneratingColumn event I have some code that looks like this: if (e.Property.Name.Contains("MetaData")) { var descCol = new DataGridTextColumn(e.Property); var bnd = new Binding("Description"); bnd.Mode = BindingMode.TwoWay; descCol.Binding = bnd; e.Column = descCol; e.Column.Header = "Description"; return; } The column binds to a type MetaData which has a string property named Description that I would like displayed in my DataGrid. So far I've been unable to get the value of the Description property to display in my DataGrid. I think the path I am passing into the Binding constructor might be incorrect. I've tried "MetaData.Description" as well and it doesn't work either. Can anyone help me properly set up the binding on my DataGridTextColumn?

    Read the article

  • Entity framework generates values for NOT NULL columns which has default defined in db.

    - by Muhammad Kashif Nadeem
    Hi I have a table Customer. One of the columns in table is DateCreated. This column is NOT NULL but default values is defined for this column in db. When I add new Customer using EF4 from my code. var customer = new Customer(); customer.CustomerName = "Hello"; customer.Email = "[email protected]"; // Watch out commented out. //customer.DateCreated = DateTime.Now; context.AddToCustomers(customer); context.SaveChanges(); Above code generates following query. exec sp_executesql N'insert [dbo].[Customers]([CustomerName], [Email], [Phone], [DateCreated], [DateUpdated]) values (@0, @1, null, @2, null) select [CustomerId] from [dbo].[Customers] where @@ROWCOUNT > 0 and [CustomerId] = scope_identity() ',N'@0 varchar(100),@1 varchar(100),@2 datetime2(7) ',@0='Hello',@1='[email protected]',@2='0001-01-01 00:00:00' And throws following error The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Can you please tell me how NOT NULL columns which has default values at db level should not have values generated by EF? DB: DateCreated DATETIME NOT NULL DateCreated Properties in EF: Nullable: False Getter/Setter: public Type: DateTime DefaultValue: None Thanks.

    Read the article

  • Improving MySQL Update Query Efficiency

    - by Russell C.
    In our database tables we keep a number of counting columns to help reduce the number of simple lookup queries. For example, in our users table we have columns for the number of reviews written, photos uploaded, friends, followers, etc. To help make sure these stay in sync we have a script that runs periodically to check and update these counting columns. The problem is that now that our database has grown significantly the queries we have been using are taking forever to run since they are totally inefficient. I would appreciate someone with more MySQL knowledge than myself to recommend how we can improve it's efficiency: update users set photos=(select count(*) from photos where photos.status="A" AND photos.user_id=users.id) where users.status="A"; If this were a select statement I would just use a join but I'm not sure if that is possible with update. Thanks in advance for your help!

    Read the article

  • Quickbooks ItemServiceQueryRq not returning all service items

    - by gdx
    I am implementing a billing system for a client. I wrote this XML query to grab all the Item Service Codes from the company file: <?xml version=\"1.0\" encoding=\"utf-8\"?><?qbxml version=\"2.0\"?><QBXML><QBXMLMsgsRq onError=\"continueOnError\"><ItemServiceQueryRq requestID=\"81\"></ItemServiceQueryRq></QBXMLMsgsRq></QBXML> For the life of me I can't get QB web connector to return all of the service codes. The company file has about 500 service codes but it only returns 67. Does anyone have any idea on why this would happen? The QB web connector application log doesn't provide any hints either.

    Read the article

  • Can my tortoise vs. hare race be improved?

    - by FredOverflow
    Here is my code for detecting cycles in a linked list: do { hare = hare.next(); if (hare == back) return; hare = hare.next(); if (hare == back) return; tortoise = tortoise.next(); } while (tortoise != hare); throw new AssertionError("cyclic linkage"); Is there a way to get rid of the code duplication inside the loop? Am I right in assuming that I don't need a check after making the tortoise take a step forward? As I see it, the tortoise can never reach the end of the list before the hare (contrary to the fable). Any other ways to simplify/beautify this code?

    Read the article

  • jquery bubblepopup inside jquery carousel

    - by sam
    Hi, I am trying to use the jquery bubble popup inside the jquery carousel. the problem everything works fine. but say if i have 10 items in the carousel, display 5 at a time, hiding the remaining 5 items(which could be opened by clicking the left or right navigation). so when we move the mouse over each carousel item that is visible on the screen, we can see the bubble popup. here, if i move the mouse over the empty area on the screen, i am still getting the bubble pop which shouldnt be visible because that particular carousel item is hidden.if i keep on moving over all the hidden items, i am able to see the bubble popup. is there anyway to hide the bubble pop when the carousel item is not visible on the screen.

    Read the article

  • PHP, better to set the variable before if or use if/else?

    - by DssTrainer
    So a simple one that I just never could find a straight answer on. What is better (performance or otherwise): $var = false; If ($a == $b) { $var = true; } or If ($a == $b) { $var = true; } else { $var = false; } I've heard arguments for both ways. I find the first cleaner to ensure I have it set, and a little less code too. The pro being that you may only need to set it once without conditional. But the con being that if the argument is true, it gets set twice. I am assuming the second way is probably best practice

    Read the article

  • Windows Phone 7 - Lack of interest?

    - by guybarrette
    We usually have between 40 and 80 people attending our regular meeting at the Montreal .NET Community.  This week, we had a special Windows Phone 7 blitz with 2 meetings. The topics were very good: Tou.tv and Flickr apps development retro feedback from the teams who wrote them. In the first meeting, RunAtServer discussed how they built the Tou.tv WP7 app for Radio-Canada.  In the second meeting, nVentive discussed how they built the WP7 and Slate clients for Flickr. Strangely, we had our lowest attendance in years with these 2 WP7 meetings.  Lack of interest in WP7?  Too early? var addthis_pub="guybarrette";

    Read the article

  • Get your picture on the screen at MIX11: Help me create a repository of sample data

    - by Laurent Bugnion
    Here is your chance to get your picture on the big screen during my MIX11 presentation in April this year. I need to create a small repository of sample data for my demos. So instead of tapping in my imagination and creating dummy users (or reusing past information I already used in other demos), I thought I would appeal to the amazing community: Send me an email with the following information. I will include the first 30 users into my sample data repository and use your info in my demo. First Name Last Name Date of birth Picture Link to Facebook profile (optional) Disclaimer: The data will only be running locally on my hard drive. The demos will however be filmed and the videos made public. By providing this information, you explicitly consent to this data being used in demos at MIX11 and possibly in following conferences. The data will only be used for demo purposes. Thanks for your help!!   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12  | Next Page >