Daily Archives

Articles indexed Tuesday April 13 2010

Page 21/126 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • SQL exclude a column using SELECT * [except columnA] FROM tableA?

    - by uu?????s
    We all know that to select all columns from a table, we can use SELECT * FROM tableA Is there a way to exclude column(s) from a table without specifying all the columns? SELECT * [except columnA] FROM tableA The only way that I know is to manually specify all the columns and exclude the unwanted column. This is really time consuming so I'm looking for ways to save time and effort on this, as well as future maintenance should the table has more/less columns. thanks!

    Read the article

  • Subsonic, child records, and collections

    - by Dane
    Hi, I've been working with subsonic for a few weeks now, and it is working really well. However, I've just run into an issue with child objects with additional partial properties. Some of it is probably me just not understanding the .Net object lifecycle. I have an object - search. This has a few properties like permissions and stuff, and it links to a child table called search_options. In my Asp.Net app, it loops through these search options and creates controls. Then on postback, it grabs the values and assigns it back to a "value" property on the search_option. This value property is a simple string that's defined in a partial class. I then want to create a method on the search object, called PerformSearch. This then loops through the child search_options, and performs a custom query based on the "value" property. However, even though I assign the "value" property to the child search_option, when I access it later via the search.search_options collection, it is null. I'm guessing that maybe because it's accessing it in two different places, it performs another lazy load from the DB and the value is lost? Is there a way to tell the class that it's already loaded or something? or a way to access it so it's not reloaded from the DB? Code is below (shitty pseudocode, not full version) : ASP.Net page, loading back the values from postback : dim obj_search as search = new subsonic.query.select().......' retrieves the search object for each opt as search_option in obj_search.search_options opt.Value = Ctype(FindControl("search_option_" + opt.search_option_id),Textbox).Text debug.print(opt.Value) ' value is correct next for each opt as search_option in obj_search.search_options debug.print(opt.Value) 'this is nothing next Now, the partial class : public partial class search_option private m_value as string public property Value() as string get return m_value end get set( byval value as string) m_value = value end set end property end class

    Read the article

  • Sending email from an alternative domain to protect my "core" domain from spam filters

    - by Jack7890
    I run a website (seatgeek.com) that sends a lot of transactional email to users--account updates, alerts, etc. It's important to us that our domain remains clean in the eyes of spam filters. We'd like to roll out an email marketing campaign. It's nothing particularly spammy, but this would be the first time we ever emailed to people who hadn't expressly asked to receive email from us. It's to market a new product we built to a specific niche of professionals. In order to protect our domain in the eyes of spam filters, we're considering sending the marketing email from an alternative domain. The alternative domain is an alternative landing page we sometimes use for this new product. Is there any way this could backfire on us? Does it seem like a particularly poor idea?

    Read the article

  • Why is Apple System Image Utility so slow?

    - by Jon Rhoades
    I'm using Apple System Image Utility (SIU) on Snow Leopard 10.6.2 and I am rather disturbed it takes over Three hours to make a Netrestore or Netboot image. I'm using as the donor machine a brand new iMac and as the imaging machine a brand new iMac connected using target disk mode & Firewire 800. The hard drive size and subsequent image is about 8GB. To restore the image over the network takes about 4 minutes. Given that Norton Ghost will take an image in about 5 minutes (or less on newer machines) over USB2, why is the Mac over an order of magnitude slower?

    Read the article

  • How to leave the open file in eclipse tab after search?

    - by Foolish
    when we open a file from "Package Explorer" in eclipse, after we use it, it will leave in the tabs. If we open a file from "Search" result, then after we search another keyword, it will disappear, we need to see the search result to find out that. Is there any solution that I can leave the opened tab in the tabs after I opened from Search panel ?

    Read the article

  • Is there a way to link text controls in Word 2007?

    - by Jared Harley
    I am creating a form in Word 2007, using the controls available in the Developer tab. On my first page, I have the user enter a name into a text control. I want to have a control on the second page to automatically fill in with the same text as the first one. Is there any way to link these controls together?

    Read the article

  • How to save map drive password

    - by Ravisha
    I have a map drive created from ToolsMap network drive. Where in the drive is mapped to a different machine's shared folder.So each time i switch off the machine ,it asks for password when i open the drive.Is there a way to save this password?

    Read the article

  • How do you update table row background color in IE using Javascript/CSS ?

    - by giulio
    I have a table that i want to "highlight" during onmouseover/onmouseout. I already know this is required in IE but not in other browsers. I have managed to detect the events triggering and this TR tag effectively works. (Note that the originating class "contentTableRow" doesn't seem to be causing any issues.) class="contentTableRow" onclick="openForm('SomeID');" onmouseover="highlight('someRowID', true);" onmouseout="highlight('someRowID', false);" id="someRowID" All is fine and dandy, the "highlight" function fires and actually sets the appropriate class. It's just that IE won't process the CSS class name change. Here is a snippet of the CSS I am using to make the change. .HighlightOn { cursor:pointer; background-color: #D1DFFF; } .HighlightOff { background-color: #E1EEFE; } I can see that the Class names are getting updated when I debug it, and also check it in Firebug. But it seems that IE doesn't like this usage of classes with a TR tag.. Is it the way I am structuring the class for Tables ? Any advice ?

    Read the article

  • NSUserDefaults not saving properly

    - by BWC
    Hey Guys I'm having issues with NSUserDefaults and I don't quite understand what's going on My App has 5 levels and each level does the exact same thing with NSUserDefaults (Retrieves the levels defaults, changes the value as the user plays the level and then sets the defaults and syncronizes at the end of the level) the first 4 levels...work without a hitch but the last level doesn't save the values. The app doesn't crash and the last level isn't the very last thing that happens, And I even have the defaults synchronized when the application terminates. Is there a max size on the NSUserDefaults or is there anything anyone can think of that I haven't, I'll post the code below but like I said the first four levels work perfectly //header NSUserDefaults *userData; @property(nonatomic,retain) NSUserDefaults *userData; //class file //Sets the boolean variables for the class to use userData = [NSUserDefaults standardUserDefaults]; boolOne = [userData boolForKey:@"LevelFiveBoolOne"]; boolTwo = [userData boolForKey:@"LevelFiveBoolTwo"]; boolThree = [userData boolForKey:@"LevelFiveBoolThree"]; boolFour = [userData boolForKey:@"LevelFiveBoolFour"]; boolFive = [userData boolForKey:@"LevelFiveBoolFive"]; boolSix = [userData boolForKey:@"LevelFiveBoolSix"]; boolSeven = [userData boolForKey:@"LevelFiveBoolSeven"]; //End Of Level [userData setBool:boolOne forKey:@"LevelFiveBoolOne"]; [userData setBool:boolTwo forKey:@"LevelFiveBoolTwo"]; [userData setBool:boolThree forKey:@"LevelFiveBoolThree"]; [userData setBool:boolFour forKey:@"LevelFiveBoolFour"]; [userData setBool:boolFive forKey:@"LevelFiveBoolFive"]; [userData setBool:boolSix forKey:@"LevelFiveBoolSix"]; [userData setBool:boolSeven forKey:@"LevelFiveBoolSeven"]; [userData synchronize]; When when I switch to the view that uses these defaults they values are correct but when I terminate the application and restart it, these values aren't saved, every other level does the exact same process this is the only level that doesn't work. I've stared at this for quite awhile and I'm hoping someone out there has run into the same problem and can give me some insight on how they resolved it. Thank you in Advance BWC

    Read the article

  • Problem with custom Equality and GetHashCode in a mutable object

    - by Shimmy
    Hello! I am using Entity Framework in my application. I implemented with the partial class of an entity the IEquatable<T> interface: Partial Class Address : Implements IEquatable(Of Address) 'Other part generated Public Overloads Function Equals(ByVal other As Address) As Boolean _ Implements System.IEquatable(Of Address).Equals If ReferenceEquals(Me, other) Then Return True Return AddressId = other.AddressId End Function Public Overrides Function Equals(ByVal obj As Object) As Boolean If obj Is Nothing Then Return MyBase.Equals(obj) If TypeOf obj Is Address Then Return Equals(DirectCast(obj, Address)) Else Return False End Function Public Overrides Function GetHashCode() As Integer Return AddressId.GetHashCode End Function End Class Now in my code I use it this way: Sub Main() Using e As New CompleteKitchenEntities Dim job = e.Job.FirstOrDefault Dim address As New Address() job.Addresses.Add(address) Dim contains1 = job.Addresses.Contains(address) 'True e.SaveChanges() Dim contains2 = job.Addresses.Contains(address) 'False 'The problem is that I can't remove it: Dim removed = job.Addresses.Remoeve(address) 'False End Using End Sub Note (I checked in the debugger visualizer) that the EntityCollection class stores its entities in HashSet so it has to do with the GetHashCode function, I want it to depend on the ID so entities are compared by their IDs. The problem is that when I hit save, the ID changes from 0 to its db value. So the question is how can I have an equatable object, being properly hashed. Please help me find what's wrong in the GetHashCode function (by ID) and what can I change to make it work. Thanks a lot.

    Read the article

  • Javascript source code analysis ( specifically duplication checking )

    - by David
    Partial duplicate of this Notes: I already use JSLint extensively via a tool I wrote that scans in intervals my current project directory for recently updated/created .js files. It's drastically improved productivity for me and I doubt there is anything as good as JSLint for the price (it's free). That said, is there any analysis tool out there that can find repetitive or near-duplicate code blocks, the goal being to make it easier to find opportunities to consolidate large files or small/medium sized projects?

    Read the article

  • Playing Multiple sounds at the same time in Android

    - by Wrapper
    I am unable to use the following to code to play multiple sounds/beeps simultaneously. In my onclicklistener I have added ... public void onClick(View v) { mSoundManager.playSound(1); mSoundManager.playSound(2); } ... But this plays only one sound at a time, sound with index 1 followed by sound with index 2. How can I play atleast 2 sounds simultaneously using this code whenever there is an onClick() event? public class SoundManager { private SoundPool mSoundPool; private HashMap<Integer, Integer> mSoundPoolMap; private AudioManager mAudioManager; private Context mContext; public SoundManager() { } public void initSounds(Context theContext) { mContext = theContext; mSoundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0); mSoundPoolMap = new HashMap<Integer, Integer>(); mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); } public void addSound(int Index,int SoundID) { mSoundPoolMap.put(1, mSoundPool.load(mContext, SoundID, 1)); } public void playSound(int index) { int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f); } public void playLoopedSound(int index) { int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, -1, 1f); } }

    Read the article

  • Asp.net TreeView control - maximum number of nodes

    - by mas_oz2k1
    I have a treeView control in ASP.NET page that will be loaded with up to 12,000 nodes in different levels. For example: Node 1 Node 1.1 … Node 1.400 Node 1.400.1 … Node 1.400.6400 Node 2 Node 3 Node 4 According to this link: http://msdn.microsoft.com/en-us/library/ms529261.aspx the node limit is 1000. Is this correct or is it dependent on available memory(please specify value)? Assuming it is correct. is there any way to split the 4600 child nodes in say in chunks of 300 hundred? I am thinking that if dummy nodes are used (previous /next navigation) to navigate the chunks will easy the load of the html page. Sample code in C# will be greatly appreciated. (Or VB.NET if you can not translate it to C#)

    Read the article

  • PHP, MySQL, and temporary tables

    - by dave
    Php novice. 1.Is there anything wrong with this PHP & MySQL code? include_once "db_login.php" ; $sql = "DROP TEMPORARY TABLE IF EXISTS temp_sap_id_select" ; mysql_query ( $sql ) or ( "Error " . mysql_error () ) ; $sql = " CREATE TEMPORARY TABLE temp_sap_id_select ( `current_page` INT NOT NULL, `total_pages` INT NOT NULL, `select_date` DATE NOT NULL, `select_schcode` CHAR(6) NOT NULL, `select_user` CHAR(30) NOT NULL, `select_id` CHAR(9) NOT NULL ) " ; mysql_query ( $sql ) or ( "Error " . mysql_error () ) ; 2.Admittedly, I'm a dull boy, but I'll ask anyway: If I'm using a MySQL GUI and have open the target database, will it be aware of the above temporary table created by PHP/MySQL (IF the temporary table is properly created)?

    Read the article

  • Php fetch rows from multiple MySQL tables

    - by Jon McIntosh
    Right now I am fetching all of the rows from one of my tables: query = "SELECT * FROM thread WHERE threadid = 2 ORDER BY threadid DESC"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if((!is_bool($result) || $result) && $num_rows) { while($row = mysql_fetch_array($result)) { $thread = $row['title']; $threadID = $row['threadid']; $poster = $row['postusername']; } What I want to do is go to another table on my database: "post_display", and get the row 'text' where the threadid = 2.

    Read the article

  • c#: adding two strings

    - by every_answer_gets_a_point
    i am doing: html = new WebClient().DownloadString("http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=" + biocompany); and i am getting the error: Error 1 Operator '&' cannot be applied to operands of type 'string' and 'string' but i am not even using the & ! please help!

    Read the article

  • Feature Activation Error(Cannot Add Dll to GAC)

    - by sbtahir
    Hi.. we have created a feature ,which have got 2 application pages. one is to activate the user control and the other one is for database configuration,for the database configuration the user have to give the .mdf and .ldf files to restore the database. For the restoration of database we have used microsoft.sqlserver.replication.dll, the feature is working fine, but when we deploy it on any other machine, at the time of activation it gives error, and the error is: Error: Cannot add the specified assembly to the global assembly cache: Microsoft.SqlServer.Replication.dll. Does anyone know how to solve this? Thanks SAAD

    Read the article

  • how to create simulator for web application for load test and stress test

    - by girish
    i m developing a web application but...now i need to create simulator for the same...that will be able to re-run the process that has been done on website... let's say i m developing a auction site where user's bid on product.... during these process the number of user's bid on the same product and at the end one user buy the product... now what i want is.. i want to record this process or any thing so that i can run the process for the same again so that i can test the load and the stress on web application and the database server.. Thank you.

    Read the article

  • unzip strings in javascript

    - by sopppas
    anyone knows a simple JS library implementing the UNZIP algorithm? No disk-file access, only zip and unzip a string of values. there are ActiveX, using WinZIP and other client dependent software for ZIP, written in JS. but no pure algorithm implementation, is it really difficult or non-functional? i would use it for displaying KMZ files in a HTML page with the GMap object (google maps). The KMZ file is just a zipped KML file. I want to unzip a KMZ file and feed the KML to GMap.

    Read the article

  • Serveur d'application Java : Téléchargez SpringSource Tc Server 2.0, un Apache Tomcat optimisée et a

    SpringSource annonce la sortie de Tc Server 2.0, un Tomcat packagé et supporté par SpringSource. Ce produit est décliné en trois version : Standard Edition : Un tomcat préconfiguré, optimisé et amélioré par des fonctionnalités d'administration et de diagostic. Spring Edition : Un Tomcat specialement conçu pour déployer des applications Spring. Celui-ci, en utilisant une version instrumentée des JAR de Spring, permet d'avoir du monitoring très détaillé sur le fonctionnement des applications. Developer Edition : Gratuite, c'est une version de tomcat dédié au développement, permettant dans le cas d'application Spring (et en particulier Spring MVC) d'avoir des informations sur le fonctionnement de l'application

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >