Daily Archives

Articles indexed Sunday January 9 2011

Page 18/29 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How can I generate sql inserts from pipe delimited data?

    - by user568866
    Given a set of delimited data in the following format: 1|Star Wars: Episode IV - A New Hope|1977|Action,Sci-Fi|George Lucas 2|Titanic|1997|Drama,History,Romance|James Cameron How can I generate sql insert statements in this format? insert into table values(1,"Star Wars: Episode IV - A New Hope",1977","Action,Sci-Fi","George Lucas",0); insert into table values(2,"Titanic",1997,"Drama,History,Romance","James Cameron",0); To simplify the problem, let's allow for a parameter to tell which columns are text or numeric. (e.g. 0,1,0,1,1)

    Read the article

  • Print an EObject ?

    - by tul
    I am writing some eclipse emf code and would like to print the content of an EObject (not store it to disk). Here is what I try: public static void print(EObject obj) { Resource eResource = obj.eResource(); try { eResource.save(System.out, null); } catch (IOException e) { e.printStackTrace(); } } but that gives a NullPointerException. I have tried this instead: public static void print(EObject obj) { ResourceSet resourceSet = new ResourceSetImpl(); resourceSet.getResourceFactoryRegistry().getProtocolToFactoryMap() .put("*", new XMIResourceFactoryImpl()); Resource resource = resourceSet.createResource(URI.createURI("dummyfile.xml")); resource.getContents().add(obj); try { resource.save(System.out, null); } catch (IOException ioe) { ioe.printStackTrace(); } } This works, but is it not possible to print to screen without specifying a dummy URI??

    Read the article

  • How do I break a huge WordPress multi-site database up into separate MySQL databases ?

    - by Faith McNulty
    How do I break a huge WordPress multi-site database up into separate MySQL databases? I have 24 WordPress MU-or- multi-site sites, holding over 20K users in total. My Server says I must break them into smaller or separate databases But I am at a loss as to how this is accomplished ? I seem to remember somewhere in the original install a option setting asking if wp should use separate data bases True or False and it was set to false by default ? but Now I can't seem to find it ? Please help !

    Read the article

  • Testing the load factor in my lab

    - by Ami Winter
    I am a system admin in a lab, I have ~90 computers in the lab and I want to check the load factor on them.. meaning, to check how many people are working on the computers hourly.. To see if I need to buy more computers or not. I am looking for a way to build a script to check if a computer is logged on or not.. (0 for log off - 1 for log on) After I will have this data, I know how to build a script to build me the graphs. All the computers are linked via a domain and most of them have windows XP (few windows 7) I'll be happy to get some help. Amihay

    Read the article

  • Ensure a process is running on a remote computer

    - by awilinsk
    We have about ten client computers ranging from Windows XP to Windows 7 that have a little program that runs in the tray. This program needs to be running at all times and sometimes it either crashes or a user exits the program. We would like to be able to check every hour or so to see if this program is running. If it is not running, it should be started. I have tried using powershell on one of our servers to get the process from a remote computer and if it doesn't find it, to start it. But, that fails because it cannot start the process as an interactive user. I tried setting up a task in task scheduler, but Windows XP task scheduler is not very good or configurable. We would like this to be as easy to administer as possible. What would be the best way to do this?

    Read the article

  • Help on using mod_rewrite to serve I18N static site

    - by Guandalino
    My static site www.example.com is translated in different languages and files are organized in this hierarchy: / /de index.html seite-1.html /en index.html page-1.html /it index.html pagina-1.html The root contains no files, just one subdirectory for each language the site is translated in, while subdirectories contain pages translated (both content and file name are) in the language corresponding to subdirectory name, de, en, it, etc. The question is: how to configure mod_rewrite so that when a client visits www.example.com it is taken to the correct version of the site, falling back to english version if the required locale is not supported (i.e. Accept-Language header doesn't exist or specifies a language for which the site is not available, e.g. fr)? Thanks for any pointer, I'm here to provide further details or feedback! Best regards

    Read the article

  • MySQL stops accepting connections over 3306, still working on localhost

    - by Ben Dilts
    I have a MySQL database that stopped accepting connections from my web server altogether. So I SSH'ed into the server and started checking its vitals. The hard disks had plenty of open space, and there was plenty of available memory and swap space. Nothing was eating up the CPU (close to 100% idle). I even connected to MySQL locally and ran a few queries without any issues. But SHOW PROCESSLIST only showed my own connection, no others. Worst of all, in the MySQL log, no errors even remotely coincided with the unavailability of the server. On the web server, I got an error saying "Lost connection to MySQL server during query" at the moment the unavailability started, followed by a bunch of "MySQL server has gone away" errors. There's only one other application on the server that accepts network connections, and I killed that one (in case it was holding too many open connections or something), but it didn't help. Finally I just restarted the MySQL process, and everything is (for now) working again. What else should I check in these circumstances? Any idea what the problem might be? And how might I verify that is in fact the problem?

    Read the article

  • Snowfall application with Windows 7 compatibility

    - by Shiki
    Okay, this may seem to be a strange question. I'm searching for a 'snowfall application'. Back then we had a lot of like this.. in the old ages, when XP came out, so on. Nowadays, I can't find a single working one. It's not like I suddenly want something like this, but a girl asked me whethers its possible or not. IMHO its possible but... Please help me out. =) (Obviously, free software shareware.)

    Read the article

  • List of tablets with keyboards.

    - by JamesM
    Please if you know any good tablets with keyboards that come either built-in or attachable (not via a USB port) please post a link to the tablet, Please add a review for that tablet if you have one, if you don't have one please say what you would do with it if you had one. It must have a physical keyboard, Cannot be a wired or wireless keyboard, only built-in/attachable see below tablets for more of an idea. Tablets With Keyboards: http://gdgt.com/asus/eee/pad/slider/ http://gdgt.com/asus/eee/pad/transformer/ If you have a table, Please what do you think of it: (Review) Your-Name: Your review. If you don't have a tablet (with a non USB keyboard) please say what you would do with one: JamesM: If I have a slider or a transformer, it would be running kFreeBSD-Debian-Squeeze. Please feel free to improve the layout/format of this topic.

    Read the article

  • insert, delete etc. keys not working on Cherry Strait keyboard

    - by Brabster
    Hey folks, I got a Cherry Strait USB wired keyboard for xmas and I've been unable to get several keys working under Ubuntu 10.10 or Win XP. There are a few keys. including the Print Screen key, insert, end, delete, pg up, pg down and home. I've not been able to identify any others that aren't working. I'm not sure as to the best approach to determine what's wrong. Is there any way to confirm whether there is any output from the keyboard in response to pressing those keys, ideally in Ubuntu as that's where I spend most of my time so that I know if it's a fault with the device itself? (I've tried different USB ports and also hitting those keys whilst in the Keyboard Shortcuts app, no response to these keys)

    Read the article

  • Requirment Analysis Communication

    - by Rahul Mehta
    Hi, Someday s ago we was discussing about the current project, and suddenly sir and my senior started talking about the new feature to add in the project , and i become lost :). i was not able to find how i should provide my input for the new feature. So i want to know what things should be discussed for developing new feature in project and how we can contribute in requirement talk of new features. Please suggest.

    Read the article

  • How to organize a larger project with several sub-projects and their dependencies?

    - by RoToRa
    As a software developer until now, I've mostly worked on projects that were quite "monolithic" with hardly any dependencies on other projects, without building automation (no Make, Ant, Maven, etc.) and kept on a simple version control system (mostly Subversion) with just a few easily managed version branches. Now together with some friends I'm planning a project that is intended to run on multiple platforms (mostly mobile: Android, iOS, Kindle, Windows, etc.), thus written in several languages and on different development platforms. This will lead to many dependencies: All projects sharing the same resources (e.g. images) or projects dependent on each other (e.g. a core Java library project used by the Android and other Java based implementations). So what I need is some basic information on how to answer questions such as: How would the VCS be structured? Would a client-base or a decentralized VCS be better? How to decide building automation system(s) to use? Since this quite an open question I guess for now it would be great if you could point me to any books or web resources that you can recommend for this topic.

    Read the article

  • Emacs keybindings for texboxes in firefox?

    - by Seamus
    I'm so used to emacs that sometimes, when I'm typing something in a textbox in firefox, I sometimes try and do C-p to move up a line. It is seriously annoying to have to cancel a print dialog box every time I try and move about my text. If it's not horrendously complicated, I'd like to have keybindings that emulate emacs inside textboxes in firefox... Obviously, I wouldn't need all the keybindings, but movement, marking, killing and yanking would be useful. Is this an insane request?

    Read the article

  • NSUserDefaults: detecting nil

    - by alJaree
    I have some code in my classes to read from NSUserDefaults NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; score = [defs integerForKey:@"score"]; this causes a crash. Im guessing it is because the score value is nil or doesnt exist. How can I check if it is nil? EDIT. The following code causes a crash when storing to NSUserDefaults. NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; [defs setInteger:0 forKey:@"score"]; [defs setInteger:3 forKey:@"lives"]; [defs release]; Im not sure what the issue is On some crashes there isnt even a crash report in the console. Thanks

    Read the article

  • Excel File opened under Ubuntu, read by R, OpenOffice

    - by Vishal Belsare
    I have a bunch of Excel files which are updated on a daily basis on a Windows machine. I transfer them to a Ubuntu machine and want to open them there. Specifically, I want to read the files as a database under R. A couple years ago, I used ODBC under a Windows machine to open Excel files through R. Is there any way, I can do this with R under Ubuntu? I could make a database .ODB file for the corresponding XLS files using OpenOffice, but I don't know of a way to connect to a .ODB database. OpenOffice seems to have ways to connect TO databases, but no way to connect to ODB. Thanks for any potential solutions.

    Read the article

  • WP7: Why does a ListBox.ItemsPanel break my ElementName data binding?

    - by iguanaNet
    I have a Windows Phone 7 ListBox that binds to a list of integers. I am using the default MVVM Light template, so there is a ViewModel class that contains data and a simple RelayCommand. Here is the ListBox: <ListBox ItemsSource="{Binding MyData}"> <ListBox.ItemTemplate> <DataTemplate> <Button Content="{Binding}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <cmd:EventToCommand Command="{Binding ElementName=ContentGrid, Path=DataContext.TestCommand}" CommandParameter="{Binding}" /> </i:EventTrigger> </i:Interaction.Triggers> </Button> </DataTemplate> </ListBox.ItemTemplate> </ListBox> This displays a vertical list of integers inside buttons. If you click any of them, the following command code executes and shows a pop-up: new RelayCommand<int>(i => MessageBox.Show("Test" + i)); However, if I simply add the following XAML to change to a horizontal list, the databinding fails. Nothing happens when you click the button and no error messages are written to the Output window. <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> I have tried some other types of binding for the EventToCommand. For example, specifying my ViewModel as a static resource. It works, but is less ideal than the example above. Why does that ItemsPanel break the databinding?

    Read the article

  • IIS 6.0 Rewrite rules for Wordpress (Forward slash not working and other things)

    - by DigitalBlade
    Hi, I am using Wordpress 3.0.4 on IIS 6.0 and Windows Server 2003, hosted by a company. I was having lots of issues using permalinks. I have fixed most, but now I have an issue with a forward-slash not being added to the address. This would be fine on most websites, but not on IIS for some reason. Specifically, if I go to "mysite.com/wp-admin" I can log-in and get to the dashboard, but as soon as I click anything there i am redirected to a broken link. For example: "mysite.com/post-new.php". If I add the slash at the end it's fine. So I tried to have a rewrite rule to automatically add the slash to such address: RewriteRule /wp-admin /wp-admin/ [L] But it still doesn't work. For your reference, here's the complete file: [ISAPI_Rewrite] RewriteBase / RewriteCond ${REQUEST_FILENAME} !-f RewriteCond ${REQUEST_FILENAME} !-d # For special WordPress folders (e.g. theme, admin, etc.) RewriteRule /wp-admin /wp-admin/ [L] RewriteRule /wp-(.*) /wp-$1 [L] RewriteRule /(.*\.(?:jpg|jpeg|gif|css|txt|xml|html|png|js)) /$1 [I,L] # Rules to ensure that normal content gets through RewriteRule /images/(.*) /images/$1 [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /robots.txt /robots.txt [L] RewriteRule /phpmyadmin/(.*) /phpmyadmin/$1 [L] RewriteRule /phpmyadmin /phpmyadmin/ [L] # For all WordPress pages RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] Any ideas? Thanks in advance

    Read the article

  • Hex representation of Euro Symbol €

    - by Rahul
    Hi I was using XVI32 (Hex Editor) to get the hex representation of the Euro symbol and it gives me the value as 80. Another site: http://www.string-functions.com/string-hex.aspx does the same. I am not able to understand why the hex representation is 80 instead of 0x20AC. This 0X80 gives 128 in decimal and if I use Alt+0128 it actually produces the Euro symbol. Could somebody throw some light on what could be the logic behind this conversion from string to hex conversion ? Thanks

    Read the article

  • Add image contact in address book

    - by Paska
    Hi all, how can i use kABPersonImageFormatThumbnail or something else to set an image to a contact in address book??? I want use a /resources file. Now i use ABMultiValueAddValueAndLabel(multiPhone, @"+39-02-1234567", kABWorkLabel, NULL); to set a value in address book. An image seems to be the same behavior, but what type need use? ABMultiValueAddValueAndLabel(multiPhone, ?????, kABPersonImageFormatThumbnail, NULL); Thanks A

    Read the article

  • c# error: Use of unassigned local variable (context visual studio T4 ENGINE)

    - by user310291
    In C# (within the context of T4 template see http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/) I want to do this <# String myTemplateVar; #> <# if (string.IsNullOrEmpty(myTemplateVar)) { myTemplateVar= "name"; }; #> I want to give a value to myTemplateVar if myTemplateVar has not already been setup by an external call from T4 engine in another template which would have this instruction: CallContext.SetData("myTemplate.myTemplateVar", ExternalTemplateVar); But I cannot even compile in C# why ? How to fix this ?

    Read the article

  • How to fake Azure Table Storage in .NET for Unit Testing?

    - by Erick T
    I am working on a system that uses Azure Table Storage. In other systems (e.g., SQL, File based, etc), I can write a fake that allows me to test my data persistence logic. However, I can't see an easy way to create a fake for the Azure Table Service. I could create a new IIS project that behaves the same way, but that isn't a good way to write a unit test, it is more of an integration test. Any thoughts on how to unit test data access code that uses the Azure Table Storage client? Thanks, Erick

    Read the article

  • EF 4 Self Tracking Entities does not work as expected.

    - by ashraf
    I am using EF4 Self Tracking Entities (VS2010 Beta 2 CTP 2 plus new T4 generator). But when I try to update entity information it does not update to database as expected. I setup 2 service calls. one for GetResource(int id) which return a resource object. the second call is SaveResource(Resource res); here is the code. public Resource GetResource(int id) { using (var dc = new MyEntities()) { return dc.Resources.Where(d => d.ResourceId == id).SingleOrDefault(); } } public void SaveResource(Resource res) { using (var dc = new MyEntities()) { dc.Resources.ApplyChanges(res); dc.SaveChanges(); // Nothing save to database. } } //Windows Console Client Calls var res = service.GetResource(1); res.Description = "New Change"; // Not updating... service.SaveResource(res); // does not change anything. It seems to me that ChangeTracker.State is always show as "Unchanged". anything wrong in this code?

    Read the article

  • Position of SlidingDrawer handle?

    - by Christian Gawron
    I would like to have two overlapping SlidingDrawers (spanning the whole application window) with their handles side by side so that the user can open both drawers easily. However, it seems that the handle is always positioned horizontally centered (for a vertical SlidingDrawer) so that the handles collide. I tried both FrameLayout and RelativeLayout for the parent, but layout options like android:layout_alignRight seem to be ignored for the handles.

    Read the article

  • c++ struct size

    - by kiokko89
    struct CExample { int a; } int main(int argc, char* argv[]) { CExample ce; CExample ce2; cout << "Size:" << sizeof(ce)<< " Address: "<< &ce<< endl; cout << "Size:" << sizeof(ce2)<< " Address: "<< &ce2 << endl; CExample ceArr[2]; cout << "Size:" << sizeof(ceArr[0])<< " Address: "<<&ceArr[0]<<endl; cout << "Size:" << sizeof(ceArr[1])<< " Address: "<<&ceArr[1]<<endl; return 0; } Excuse me I'm just a beginner but i'd like to know why with this code, there is a difference of 12 bytes between the addresses of the first two objects(ce and ce2) (i thought about data allignment), but there is only a difference of 4 bytes between the two objects in the array. Sorry for my bad English...

    Read the article

  • Help with MySQL database structure - user notification system

    - by Simon
    Hi, I'd like to send global notifications to my users (1000+ users) and allow them to close the notification box once they have read the message. Basically I may send one notification per week globally ie/ each user get the same message and they are not personal in nature. What is the best way to achieve this? Create 2 tables: **tb_messages** message_id massage_title message_content **tb_read_messages** user_id message_id is-read That way i can just show each user the current notifications that are not read? select * from tb_read_messages WHERE user_id = $user_id AND is-read = no OR is there a more efficient way? Thanks!!!

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >