Daily Archives

Articles indexed Monday July 9 2012

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

  • Issues with dynamically allocating a string array

    - by Jason Block
    Brand new to C. I am trying to dynamically allocate the array frags2 of size numberOfFrags and copy over the contents of the original array to it. I have tried numerous approaches and searching and do not understand what is going wrong here. Sizeof on the new array returns 0 instead of what I thought I malloc'd. Any help would be much appreciated! int main(int argc, const char* argv[]) { char* frags[MAX_FRAG_COUNT]; FILE* fp = fopen(argv[1], "r"); int numberOfFrags = ReadAllFragments(fp, frags, MAX_FRAG_COUNT); fclose(fp); char** frags2 = (char**)malloc(numberOfFrags * sizeof(char*)); for (int i = 0; i < numberOfFrags; i++) { frags2[i] = frags[i]; } qsort(frags2, sizeof(frags2) / sizeof(char *), sizeof(char*), cstring_cmp);

    Read the article

  • function file_exists not working in php

    - by Rakesh R Nair
    I have been trying to find if a file_exist in the directory. If not i want to use a different image. But as i am using the file_exists function it always returns false. The code i used is while($r=mysql_fetch_row($res)) { if(!file_exists('http://localhost/dropbox/lib/admin/'.$r[5])) { $file='http://localhost/dropbox/lib/admin/images/noimage.gif'; } else $file='http://localhost/dropbox/lib/admin/'.$r[5];} But the function always return false even if the file exits. I checked that by using <img src="<?php echo 'http://localhost/dropbox/lib/admin/'.$r[5]; ?>" /> This displayed the image correctly. Please Someone Help Me

    Read the article

  • embeding google images search in my website

    - by user1445497
    I want to embed a search box to allow my website users to search images using google images search (not only images in my website, but general images search). However, I don't want an Iframe of something similar, but to present a custom list of the images and links in the format I chose. Ideally, I could get the links to the thumbnails to the in JSON. From what I have found so far, it seems that google no longer supports it's API: https://developers.google.com/image-search/ I am familiar with google custom search, but as far as I know, I can't control exactly how it will be presented. Are there other ways to do it? Thanks, Daniel

    Read the article

  • MySQL doesn't use index in join query

    - by Kocsonya Laci
    I have two tables: comments(id(primary key), author, ip(index)) and visitors(id(primary key), date_time, ip(index)) I want to join them like that: SELECT visitors.date_time FROM comments LEFT JOIN visitors ON ( comments.ip = visitors.ip ) WHERE comments.author = 'author' LIMIT 10 It works, but very slow.. In EXPLAIN it shows that it doesn't use the index on the visitors table: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE comments ref author author 78 const 9660 Using where 1 SIMPLE visitors ALL NULL NULL NULL NULL 8033 Any ideas? Thanks!

    Read the article

  • UItabbar settitlecolor,iPhone

    - by FirstTimer
    I am trying to change the color of the text of tabbar item,programmatically. I am using [[UITabBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"AmericanTypewriter" size:20.0f], UITextAttributeFont, [UIColor blackColor], UITextAttributeTextColor, [UIColor grayColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0.0f, 1.0f)], UITextAttributeTextShadowOffset, nil]]; Which should works on iOS5 and above. But my apps gets crashed with error at console : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIAppearance setTitleTextAttributes:]: unrecognized selector sent to instance 0x79f5790' *** First throw call stack: Not sure, why i am getting a crash. Also please suggest, if there is any other way to change the font color of the tabbar items. Thanks

    Read the article

  • access parametrically values of variables inside environments

    - by Apostolos
    Let's say we have one or more environments and variables in them. My question is how we access the values of these variables, parametrically. rm(list = ls()) env1 <- new.env() env1$var1 <- "value1" env2 <- new.env() env2$var2 <- "value2" env <- ls.str(mode="environment") # We get the environments var <- ls.str(eval(parse(text = env[1])))# We get the variables of an environment eval(var[1]) # We fail to get the value of a variable Thank you all, in advance

    Read the article

  • Sort List by occurrence of a word by LINQ C#

    - by Thomas
    i have stored data in list like List<SearchResult> list = new List<SearchResult>(); SearchResult sr = new SearchResult(); sr.Description = "sample description"; list.Add(sr); suppose my data is stored in description field like "JCB Excavator - ECU P/N: 728/35700" "Geo Prism 1995 - ABS #16213899" "Geo Prism 1995 - ABS #16213899" "Geo Prism 1995 - ABS #16213899" "Wie man BBA reman erreicht" "this test JCB" "Ersatz Airbags, Gurtstrammer und Auto Körper Teile" now i want to query the list with my search term like geo jcb if you look then the word geo has stored many times in the description field. so i want to sort my list in such way that the word in search term found maximum that data will come first. please help me to do so. thanks

    Read the article

  • randomize array using php

    - by Suneth Kalhara
    I need to rendomise the order of follow array using PHP, i tried to use array shuffle and array_random but no luck, can anyone help me please Array ( [0] => Array ( [value] => 4 [label] => GasGas ) [1] => Array ( [value] => 3 [label] => Airoh Helmets ) [2] => Array ( [value] => 12 [label] => XCiting Trials Wear ) [3] => Array ( [value] => 11 [label] => Hebo Trials ) [4] => Array ( [value] => 10 [label] => Jitsie Products ) [5] => Array ( [value] => 9 [label] => Diadora Boots ) [6] => Array ( [value] => 8 [label] => S3 Performance ) [7] => Array ( [value] => 7 [label] => Scorpa ) [8] => Array ( [value] => 6 [label] => Inspired ) [9] => Array ( [value] => 5 [label] => Oset ) )

    Read the article

  • How to display how many times each records in a table used by other table

    - by Fredy
    I have a problem with my query, below are two tables that tbl_tag and tbl_tag_usedby. I want to show how much of each record in tbl_tag used by record in tbl_tag_usedby. Here is a query that I use: SELECT t.*, COUNT(u.tagid) AS totale FROM tbl_tag t LEFT JOIN tbl_tag_usedby u ON u.tagid = t.id AND t.status =1 GROUP BY u.tagid and the results are as below: In this case the record id from 2 to 6 do not appear in the query results, I want record id from 2 to 6 are also shown and on the field "totale" its value is 0. Can anyone help me?

    Read the article

  • Can't get Facebook's user photos with php

    - by Liso22
    I'm trying to get the user photos, but I cannot get the user's photos data. I'm trying this: $photos = $facebook->api('https://graph.facebook.com/'.$profileFID.'/photos?access_token='.$access_token); print_r($photos); I'm sure the URL is correct since pasting it in the browser shows the photos array. However when I try to print the array to check if I got it I get only this: ( [id] => https://graph.facebook.com/1409006586/photos ) How can I get the full array with the user photos?

    Read the article

  • Having some fun - what is a good way to include a secret key functionality and fire the KeyDown event?

    - by Sisyphus
    To keep myself interested, I try to put little Easter Eggs in my projects (mostly to amuse myself). I've seen some websites where you can type a series of letters "aswzaswz" and you get a "secret function" - how would I achieve this in C#? I've assigned a "secret function" in the past by using modifier keys bool showFunThing = (Control.ModifierKeys & Keys.Control) == Keys.Control; but wanted to get a bit more secretive (without the modifier keys) I just wanted the form to detect a certain word typed without any input ... I've built a method that I think should do it: private StringBuilder _pressedKeys = new StringBuilder(); protected override void OnKeyDown(KeyEventArgs e) { const string kWord = "fun"; char letter = (char)e.KeyValue; if (!char.IsLetterOrDigit(letter)) { return; } _pressedKeys.Append(letter); if (_pressedKeys.Length == kWord.Length) { if (_pressedKeys.ToString().ToLower() == kWord) { MessageBox.Show("Fun"); _pressedKeys.Clear(); } } base.OnKeyDown(e); } Now I need to wire it up but I can't figure out how I'm supposed to raise the event in the form designer ... I've tried this: this.KeyDown +=new System.Windows.Forms.KeyEventHandler(OnKeyDown); and a couple of variations on this but I'm missing something because it won't fire (or compile). It tells me that the OnKeyDown method is expecting a certain signature but I've got other methods like this where I haven't specified arguments. I fear that I may have got myself confused so I am turning to SO for help ... anyone?

    Read the article

  • random generator to obtain data from array not displaying

    - by Yang Jie Domodomo
    I know theres a better solution using arc4random (it's on my to-try-out-function list), but I wanted to try out using the rand() and stand(time(NULL)) function first. I've created a NSMutableArray and chuck it with 5 data. Testing out how many number it has was fine. But when I tried to use the button function to load the object it return me with object <sampleData: 0x9a2f0e0> - (IBAction)generateNumber:(id)sender { srand(time(NULL)); NSInteger number =rand()% ds.count ; label.text = [NSString stringWithFormat:@"object %@", [ds objectAtIndex:number] ]; NSLog(@"%@",label.text); } While I feel the main cause is the method itself, I've paste the rest of the code below just incase i made any error somewhere. ViewController.h #import <UIKit/UIKit.h> #import "sampleData.h" #import "sampleDataDAO.h" @interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UILabel *label; @property (weak, nonatomic) IBOutlet UIButton *onHitMePressed; - (IBAction)generateNumber:(id)sender; @property(nonatomic, strong) sampleDataDAO *daoDS; @property(nonatomic, strong) NSMutableArray *ds; @end ViewController.m #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize label; @synthesize onHitMePressed; @synthesize daoDS,ds; - (void)viewDidLoad { [super viewDidLoad]; daoDS = [[sampleDataDAO alloc] init]; self.ds = daoDS.PopulateDataSource; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [self setLabel:nil]; [self setOnHitMePressed:nil]; [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (IBAction)generateNumber:(id)sender { srand(time(NULL)); NSInteger number =rand()% ds.count ; label.text = [NSString stringWithFormat:@"object %@", [ds objectAtIndex:number] ]; NSLog(@"%@",label.text); } @end sampleData.h #import <Foundation/Foundation.h> @interface sampleData : NSObject @property (strong,nonatomic) NSString * object; @end sampleData.m #import "sampleData.h" @implementation sampleData @synthesize object; @end sampleDataDAO.h #import <Foundation/Foundation.h> #import "sampleData.h" @interface sampleDataDAO : NSObject @property(strong,nonatomic)NSMutableArray*someDataArray; -(NSMutableArray *)PopulateDataSource; @end sampleDataDAO.m #import "sampleDataDAO.h" @implementation sampleDataDAO @synthesize someDataArray; -(NSMutableArray *)PopulateDataSource { someDataArray = [[NSMutableArray alloc]init]; sampleData * myData = [[sampleData alloc]init]; myData.object= @"object 1"; [someDataArray addObject:myData]; myData=nil; myData = [[sampleData alloc] init]; myData.object= @"object 2"; [someDataArray addObject:myData]; myData=nil; myData = [[sampleData alloc] init]; myData.object= @"object 3"; [someDataArray addObject:myData]; myData=nil; myData = [[sampleData alloc] init]; myData.object= @"object 4"; [someDataArray addObject:myData]; myData=nil; myData = [[sampleData alloc] init]; myData.object= @"object 5"; [someDataArray addObject:myData]; myData=nil; return someDataArray; } @end

    Read the article

  • no resource found that matches the given name Android 1.6

    - by xaero212
    I've got 'no resource found that matches the given name' but everything is set up correctly. error: Error: No resource found that matches the given name (at 'text' with value '@string/labReminderClear'). In AndroidManifest.xml: <application android:label="MyName" ..... In Strings.xml: <string name="app_name">MyName</string> ... <string name="labReminderClear">Clear</string> What could be wrong?

    Read the article

  • how to build and run core apps of ics like settings, camera etc on windows

    - by user1495186
    I have downloaded ics 4.0.3 source code, want to modify native settings, what i have to do is 1) add custom modifications to the settings 2) recompile native settings with added modifications 3) build the source code 4) generate a customized build to work on all android devices. How can I achieve the above thing? Every suggestion is appreciated. Thanks in advance. FYI: Using win7,4gb ram, intel i5 processor. Installed cygwin,git.

    Read the article

  • UIPageViewController: How to refer the UIPicker selected Value from 1 Viewcontroller to another...

    - by Abhinav
    I am referring the code from here, please have look at the code while answering my question : http://www.ioslearner.com/wp-content/uploads/2011/12/UIPageViewControllerDemo.zip important notes and few changes: I basically have a viewcontroller and contentviewcontroller . ViewController - have following UIPAgeViewController Datasource and Deligate UIPickerView - upon next and previous page turn the value in the PickerView changes contentviewcontroller - has following UIWebview - defined in Viewdidload of contentviewcontroller which dynamically fetches a html page based upon the string value (LabelContents) sent through following method -(UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController is there a way to populate the UIWebview in contentviewcontroller based upon the row selected in UIPickerView ? Kindly help.

    Read the article

  • Symfony 2 - Updating a table based on newly inserted record in another table

    - by W00d5t0ck
    I'm trying to create a small forum application using Symfony 2 and Doctrine 2. My ForumTopic entity has a last_post field (oneToOne mapping). Now when I persist my new post with $em->persist($post); I want to update my ForumTopic entity so its last_post field would reference this new post. I have just realised that it cannot be done with a Doctrine postPersist Listener, so I decided to use a small hack, and tried: $em->persist($post); $em->flush(); $topic->setLastPost($post); $em->persist($post); $em->flush(); but it doesn't seem to update my topics table. I also took a look at http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/working-with-associations.html#transitive-persistence-cascade-operations hoping it will solve the problem by adding cascade: [ 'persist' ] to my Topic.orm.yml file, but it didn't help, either. Could anyone point me to a solution or an example class? My ForumTopic is: FrontBundle\Entity\ForumTopic: type: entity table: forum_topics id: id: type: integer generator: strategy: AUTO fields: title: type: string(100) nullable: false slug: type: string(100) nullable: false created_at: type: datetime nullable: false updated_at: type: datetime nullable: true update_reason: type: text nullable: true oneToMany: posts: targetEntity: ForumPost mappedBy: topic manyToOne: created_by: targetEntity: User inversedBy: articles nullable: false updated_by: targetEntity: User nullable: true default: null topic_group: targetEntity: ForumTopicGroup inversedBy: topics nullable: false oneToOne: last_post: targetEntity: ForumPost nullable: true default: null cascade: [ persist ] uniqueConstraint: uniqueSlugByGroup: columns: [ topic_group, slug ] And my ForumPost is: FrontBundle\Entity\ForumPost: type: entity table: forum_posts id: id: type: integer generator: strategy: AUTO fields: created_at: type: datetime nullable: false updated_at: type: datetime nullable: true update_reason: type: string nullable: true text: type: text nullable: false manyToOne: created_by: targetEntity: User inversedBy: forum_posts nullable: false updated_by: targetEntity: User nullable: true default: null topic: targetEntity: ForumTopic inversedBy: posts

    Read the article

  • Entityframework duplicate record on second insert

    - by Delysid
    I am building an application for recipe/meal planning, and i have come across a problem i cant seem to figure out. i have a table for units of measure, where i keep the used units in, i only want unique units in here (for grocery list calculation and so forth) but if i use a unit from the table on a recipe, the first time it is okay, nothing is inserted in units of measure, but the second time i get a "duplicate". i suspect it has something to do with entitykey, because the primary key is identity column on the sql server (2008 r2) for some reason it works to change the objectstate on some objects (courses, see code) and that does not generate a duplicate, but that does not work on the unit of measure my insert methods looks like this : public recipe Create(recipe recipe) { using (RecipeDataContext ctx = new RecipeDataContext()) { foreach (recipe_ingredient rec_ing in recipe.recipe_ingredient) { if (rec_ing.ingredient.ingredient_id == 0) { ingredient ing = (from _ing in ctx.ingredients where _ing.name == rec_ing.ingredient.name select _ing).FirstOrDefault(); if (ing != null) { rec_ing.ingredient_id = ing.ingredient_id; rec_ing.ingredient = null; } } if (rec_ing.unit_of_measure.unit_of_measure_id == 0) { unit_of_measure _uom = (from dbUom in ctx.unit_of_measure where dbUom.unit == rec_ing.unit_of_measure.unit select dbUom).FirstOrDefault(); if (_uom != null) { rec_ing.unit_of_measure_id = _uom.unit_of_measure_id; rec_ing.unit_of_measure = null; } } ctx.Recipes.AddObject(recipe); //for some reason it works to change object state of this, and not generate a duplicate ctx.ObjectStateManager.ChangeObjectState(recipe.courses[0], EntityState.Unchanged); } ctx.SaveChanges(); } return recipe; } My datamodel looks like this : http://i.imgur.com/NMwZv.png

    Read the article

  • OpenVPN and brouting issue

    - by JavierMartinz
    I have a Guest XEN Machine in which I want to connect by OpenVPN to other network. But I have this problem: when I want to connect to that OpenVPN I get a lot of TLS handshake errors because I think that the packages did not come rightly. When, at the end, the guest machine achieve to connect (after several tries) I can't ping the other machines of the OpenVPN network. Except sometimes, where if I ping 20 times MAYBE i get ping-answer in 1-2 times. I think that this problem is related about how the HOST Xen machine 'filters' the packages to the bridge. I mean, I think that all the outgoing guest machines packages are good but the incoming traffic to the guests is not recognized well. How could I detect/solve the problem? Im using Debian Linux in both machines

    Read the article

  • Configuring IIS site to use HTTPS

    - by James
    I am working on a REST API which I have currently deployed on a Win XP Professional SP2 development machine running IIS 5.1. The site is currently being hosted on port 81 and being accessed via HTTP. I would now like to configure the site to stop using HTTP and use HTTPS only. I have developed a self-signed certificate using the SelfSSL.exe tool from the 6.0 Resource Kit Tools and set the Common Name to be the IP of my server (as it's a local development machine it has no domain name). I have also already configured the site to use SSL using the How To Set Up an HTTPS Service in IIS tutorial as my guide. However, whenever I try to access a resource in the API via HTTPS I get a 404. Any ideas?

    Read the article

  • memory usage setting

    - by user127610
    everybody,the memory usage is too much,what can i do? top - 12:54:37 up 7 days, 4:38, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 18 total, 2 running, 16 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1048800k total, 917424k used, 131376k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 15 0 2840 1364 1204 S 0.0 0.1 0:02.17 init 1161 root 14 -4 2320 600 420 S 0.0 0.1 0:00.00 udevd 1391 root 18 0 35512 1288 948 S 0.0 0.1 0:03.53 rsyslogd 1409 root 15 0 8432 1164 700 S 0.0 0.1 0:03.87 sshd 1416 root 18 0 3156 868 692 S 0.0 0.1 0:00.00 xinetd 1423 root 18 0 8672 716 292 S 0.0 0.1 0:00.00 saslauthd 1424 root 18 0 8672 488 64 S 0.0 0.0 0:00.00 saslauthd 1431 root 15 0 7020 1168 616 S 0.0 0.1 0:00.99 crond 1450 root 25 0 6236 1444 1228 S 0.0 0.1 0:00.05 sh 3328 mysql 15 0 799m 42m 4892 S 0.0 4.1 0:02.07 mysqld 15479 root 15 0 11304 3332 2688 R 0.0 0.3 0:00.06 sshd 15482 root 15 0 6372 1688 1404 S 0.0 0.2 0:00.00 bash 15497 root 15 0 2536 1044 864 R 0.0 0.1 0:00.00 top 20137 www 15 0 20672 14m 864 S 0.0 1.4 0:00.87 nginx 22351 www 16 0 52324 26m 9244 S 0.0 2.6 0:13.94 php-fpm 24231 www 16 0 51928 25m 9260 S 0.0 2.5 0:13.52 php-fpm 32682 root 15 0 35832 3228 864 S 0.0 0.3 0:02.18 php-fpm 32686 root 18 0 7368 1616 888 S 0.0 0.2 0:00.00 nginx

    Read the article

  • GPO - Setting not applied, although policy is applied

    - by Kenny Bones
    This is rather strange. In our domain we have several terminal servers and this morning a user reported that no drives are mapped when he logs on to the terminal server. So, I checked Group Policy Results and compare two users. Both users have the exact same policies applied. But for this particular user, the Script section under User Configuration - Policies - Windows Settings is just not there. For the other user, which this is working fine for, it says under the Script section that Winning GPO is Terminal2008, which is the GPO that contains the script section. And the Terminal2008 GPO is applied to both users. Also, the loopback processing is set to Replace. What could be the cause for this? I've never seen this particular issue before. I mean, both users are in the same OU, they log on to the same terminal server and the same policies are applied to both. They do not however have the exact same group memberships, but should that matter? It's not stated that the script should be run only if the user is a member of a certain group either. Not sure if that could be done through that specific setting either.All I know is, the very same policies are applied to both users, in the same OU and the same computer. Meaning, the same policies should be applied? Edit: I just ran Group Policy Results on one of the other terminal servers, which are also in the same OU, and the Scripts section is there! This means that this particular user don't get this setting when he's logged onto this particular server. What could be the cause of this?

    Read the article

  • Nagios service active only when other service is failing

    - by Laimoncijus
    Is is possible to define service to be active only the times while other service is failing? Consider following example: 2 hosts available: HostA (primary) and HostB (backup). Nagios service, which monitors amount of active connections to the host: gives OK when amount of connections to host 0 gives FAILURE when amount of connections to host = 0 If setup nagios service to monitor both hosts: HostA and HostB - it will give me OK for HostA (while it is primary and all connections normally goes to it) and FAIL for HostB (while it is backup and will receive no connections while HostA is alive). Can I make the nagios service for HostB somehow depend on sevice of HostA and give no failures (or maybe be inactive) up to the moment the service of HostA starts failing?

    Read the article

  • Changing a set-cookie header using mod_rewrite/mod_proxy

    - by olrehm
    I have a bunch of cgi scripts, which are served using HTTPS. They can only be reached on the intranet, not from the outside. They set a cookie with the attribute 'Secure', so that it can only be send via HTTPS. There is also a reverse proxy to one of these scripts, unfortunately using plain HTTP. When a response comes in from my cgi-script with a secure cookie, it is not being passed on via HTTP (after all, that is what that attribute is for). I need however, an exception to this rule. Is it possible to use mod_rewrite/mod_proxy or something similar, to change the set-cookie header in the response coming from my cgi script and remove the Secure, such that the cookie can be passed back to the user using the unsafe HTTP connection? I understand that this defeats the purpose of the Secure in the first place, but I need this as a temporary work around. I have searched the web and found how to add a set-cookie header using mod_rewrite, and I have also found how to retrieve the value of a cookie coming from the client in a cookie header. What I have not yet found is how to extract the set-cookie header received in the response of a script I am proxying for. Is that possible? How would I do that? Ole

    Read the article

  • Substiting a line through PHP in SSH

    - by Asad Moeen
    I've already setup SSH usage in PHP and most of the things work. Now what I want to do is that I'm looking to edit a line in a file and replace it back. It works directly on the server but can't seem to get it working with PHP files. Here is what I'm trying. $new_line1 = 'Line $I want to add - The $I has to go into the file as it is'; $new_line2 = 'Ending $text of the line - $text again goes into file; $query = "Addition to line"; $exec1= 'cd /root; perl -pe "s/.*/' ; $exec2= '/ if $. == 37" Edit.sh > Edited.sh'; $new="$exec1$new_line1$query$new_line2$exec2"; $edit="cd /root/mp; cp Edited.sh Edit.sh"; echo $ssh->exec($new); echo $ssh->exec($edit); Now the thing is that running the perl command directly in SSH works without any errors but when I run this through PHP I get the error: Substitution replacement not terminated at -e line 1. I want to know why would it work this way and not that?

    Read the article

  • MySQL ADO.NET Connector & MSSQL Integration Services

    - by user1114330
    Here I am, day three... attempting to sync a data view on a Windows Vista box (64 bit) running MSSQL 2012 and Visual Studio 2010. Sanity is slipping and hunger for progress fills my attention. I went through hell trying to get the MySQL ODBC drivers to get the job but to no avail...everyone seems to be lost and all the threads I can find are solutions that do not work for me. The problem: System DSN's not being seen by SSIS. SSIS DSN Not Showing as ODBC Data Source I make the decision to try out the ADO.NET connector...and to my surprise it is actually in the selection list in data sources in SSIS. So I take off running to create a Data Flow Task, create an ADO.NET Source (a local MSSQL DB)...all is good as usual. Then I move swiftly to creating a ADO.NET Destination, enter my credentials...wow, I am selecting a database finally on my linux server! Happy thinking that I finally have figured a way to get the job done. Then I move to mappings...nope, something is wrong...I am getting an error that hurts my eyes: Pipeline component has returned HRESULT error code 0xC0208457 from a a method call. Error at Data Flow Task [ADO NET Destination [81]]: Failed to get properties of external columns. The table name you entered may not exist or you do not have SELECT permission on the table object and an alternative attempt to get column properties through connection has failed. Detailed error messages are" You have an error in your SQL syntax check the manual that corresponds to your MySQL server version for the right syntax to use near "database".tablename" at line 1. The descriptor files on path C:\Program Files (x86)\Microsoft SQL Server\110\DTS\ProviderDescriptors\ does not contain schema information for connection of type MySQL.Data.MySqlClient.MySqlConnection. So it looks like it can't the information and therefore I cannot map the tables properly. Any ideas on this would be ultra helpful...thanks in advance to All!

    Read the article

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