Daily Archives

Articles indexed Monday January 17 2011

Page 8/36 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to change the binding of Meta key which runs the Unity's Dash?

    - by LFC_fan
    Currently, I am using the Unity Qt panel in my Gnome desktop of Ubuntu 10.10, and when I press the Meta a.k.a. Windows key, the Unity's dash launches, and I can't use any compiz based shortcuts. Same behaviour is exhibited when I log in to Unity 2D as well, as the Meta key launches the dash. I have no desire to change my Compiz shortcuts, so is there any way to change the keyboard mapping of Unity 2D's dash to something other or disable this shortcut completely?

    Read the article

  • Error after sudo-ing "sudo: must be setuid root"

    - by Kaustubh P
    On a colleagues computer, everytime I use a sudo command, I get this error: sudo: must be setuid root I tried various things mentioned on the internet, like changing the permissions to 4755 from a live cd, but even this command from a live-cd sudo chmod 4755 /media/device/usr/bin/sudo gives the same error. EDIT: The colleague told me that he executed this command, god knows why :/ sudo chmod -R 777 / or sudo chmod -R 777 He isnt exactly sure.

    Read the article

  • Turning off the backlight on the console

    - by Albertas Agejevas
    I'm using an IBM Thinkpad X21 as a 3G router. It's running a server install of lucid. The laptop has the lid up most of the time. There is no X, just a plain console. The colsole blanks itself, but the LCD backlight is always on. The graphics chip is ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64). The following modules related to the framebuffer are now loaded: $ lsmod | grep fb fbcon 35102 71 tileblit 2031 1 fbcon font 7557 1 fbcon bitblit 4707 1 fbcon vga16fb 11385 1 vgastate 8961 1 vga16fb Can I make the LCD backlight turn off when the colsole is unused and have it turn on automatically when needed?

    Read the article

  • Ubuntu 10.10 Network Issues (wireless as well as wired)

    - by user9054
    down vote favorite Hi Friends, I have got this issue with Ubuntu 10.10 . I have been with ubuntu 8.04 and then decided to try out ubuntu 10.10 . I booted with a LiveCD and was able to configure the wireless network painlessly using the livecd . so happily i installed ubuntu 10.10 . As soon as ubuntu came up it detected the wireless network and i was able to assign a static IP to eth1 (i dont use DHCP option on my ADSL router) and enter a wap key and use pppoeconf to configure the dialer . The net was on and i was able to surf the net . all hunky dory so far . However on the next boot the fun started . It did not detect the wireless network . I could not see the network manager icon in the systray . I used ifconfig and saw that the entry for eth1 was missing .I used ifup eth1 and it said that eth1 was already up . Then i installed wifi-radar . Wifi-Radar detected the wireless network . I configured wifi-radar for the detected wireless network , set the wap driver as wext and used the manual IP settings . However on clicking connect wifi-radar started looking for a DHCP IP , needless to say it failed . For the love of god i cannot understand why wifi-radar is using DHCP when i have specified manual settings . Next i decided to use the wired network to surf the net looking for a solution . So i plugged in the network cable from my modem , it detected the plugged in connection , i configured eth0 , used pppoeconf and connected to the net . Then i foolishly decided to reboot my PC . And wonders of wonders , the same problem appeared . I cannot see eth0 in my ifconfig anymore . i used pon to start the dsl-provider connection and it said something about network error or something . Now my ifconfig shows only lo , both eth0 and eth1 have disappeared .Can anybody help me on this ? Is it a problem with ipv6 , if so how do you disable ipv6 on ubuntu 10.10 ? OR is this is a known issue with ubuntu 10.10 ? .PS : 1) i tried linux mint 10 and had the same issue . on rebooting wireless network was not getting detected . 2) i have made myself the administrator so that there is no issue of rights or anything. Any help is appreciated.

    Read the article

  • probability of trouble-free upgrade

    - by intuited
    One of the problems with recommending Ubuntu to potential future users, especially those not particularly given to technical endeavours, is that there is a chance that upgrades will break their machine, and they'll have to pay or otherwise coerce some knowledgeable person into fixing them. In my limited experience of running successive versions of Ubuntu since 8-something on a couple of different laptops, this chance is quite high. I'm not sure if I'm just unlucky with the hardware that I'm using, or if it's a result of the higher-than-average number of packages I have installed, or if upgrades are just typically problematic. So I'd like to know the likelihood, for a casual user, of doing a release upgrade, for example from 10.04 to 10.10, without experiencing any regression bugs. Obviously this is dependent on the hardware that people are running. Canonical seems to be making some efforts towards collecting data on this, for example with the "I am affected by this bug" checkbox on their issue tracker, and with the laptop compatibility reports, but I've not seen anything comprehensive. I'm hoping for an objective reference here, for example a study carried out by relatively unbiased individuals. However, anecdotal evidence is probably useful too.

    Read the article

  • How to pull/push data from/to existing SAP system?

    - by Ahmed
    I need to connect to a SAP system, to pull/push data to/from that system? I downloaded SAP PDK for .NET, build a solution using it, but this requires Portal Runtime for .NET to be installed on server, and this cannot be done, because SAP server is a Solaris one! Also, I've checked existing solutions, but all of them use VS.NET 2003, to create what is called SAP Connector Proxy? So, is there a way to connect to SAP system apart from using VS.NET 2003?

    Read the article

  • Running single test class or group with Surefire and TestNG

    - by Slartibartfast
    I want to run single test class from command line using Maven and TestNG Things that doesn't work: mvn -Dtest=ClassName test I have defined groups in pom.xml, and this class isn't in one of those groups. So it got excluded on those grounds. mvn -Dgroups=skipped-group test mvn -Dsurefire.groups=skipped-group test when config is <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.1</version> <configuration> <groups>functest</groups> </configuration> </plugin> Parameters work fine in there are no groups defined in pom.xml. Similarly, when surefire is configured with <configuration> <includes> <include>**/*UnitTest.java</include> </includes> </configuration> I can add another test with -Dtest parameter, but cannot add group. In any combination, I can narrow down tests to be executed with groups, but not expand them. What's wrong with my configuration? Is there a way to run a single test or group outside of those defined in pom.xml? Tried on Ubuntu 10.04 with Maven 2.2.1, TestNG 5.14.6 and Surefire 2.7.1

    Read the article

  • Book recommendation for Silverlight

    - by Mathias Weyel
    Hi there, yet another question for recommendations for a book on Silverlight. I look for a book that covers the UI and styling and, if possible, custom drawing and graphics. Very important for me is the style of the book - it should focus on the actual programming and not on where to click in Visual Studio to get things done. Let's take a fictional example for proper usage of the DataGrid control: Bad: To use the data grid, drag it from the toolbox onto the control. You can change the background color by clicking on “Background” in the properties. To define custom columns, click on columns and edit them in the configuration window that opens. Good: To use the DataGrid, you need a reference to the blah dll and declare the namespace in the XAML like this (blah), the data model should be like blah and if you want to define how the columns look like, you need to define them like this (more blah). And if you want to do this in C# because you for whatever reason aren’t able or willing to use XAML, this would look like blah. Bonus points for coverage of topics like how to manage resources (images/fonts) and internationalization. There are quite some snippets on how to do that on the internet but somehow each of them looks like they work but are not a proper way of doing it. cheers Mathias

    Read the article

  • Redirect www.example.com/apple to food.example.com/fruits/apple

    - by Senthil
    I want to redirect users from www.example.com/apple to http://food.example.com/fruits/apple Note: This is a hardcoded redirection. Even a mapping if you will. "apple" will not be substituted with anything else. Nothing in the two URLs will change except for the domain of course. So there is no need for a regular expression to match the "apple" or anything else. There is already dozens of RewriteCond and RewriteRule things in the .htaccess file. I do not want them to be affected. This redirection is independent of those. I have access to the .htaccess file at the root of www.example.com and the httpd.conf What code should I put in .htaccess in order to achieve this? Or should I change the httpd.conf?

    Read the article

  • Using application roles with DataReader

    - by Shahar
    I have an application that should use an application role from the database. I'm trying to make this work with queries that are actually run using Subsonic (2). To do this, I created my own DataProvider, which inherits from Subsonic's SqlDataProvider. It overrides the CreateConnection function, and calls sp_appsetrole to set the application role after the connection is created. This part works fine, and I'm able to get data using the application role. The problem comes when I try to unset the application role. I couldn't find any place in the code where my provider is called after the query is done, so I tried to add my own, by changing SubSonic code. The problem is that Subsonic uses a data reader. It loads data from the data reader, and then closes it. If I unset the application role before the data reader is closed, I get an error saying: There is already an open DataReader associated with this Command which must be closed first. If I unset the application role after the data reader is closed, I get an error saying ExecuteNonQuery requires an open and available Connection. The connection's current state is closed. I can't seem to find a way to close the data reader without closing the connection.

    Read the article

  • ASP.NET/JavaScript: How to surround an auto generated JavaScript block with try/catch statement

    - by Rami Shareef
    In the Script documents that asp.net automatically generates how can I surround the whole generated scripts with try/catch statement to avoid 'Microsoft JScript Compilation error' My issue is: i got a DevExpress control (ASPxGridView) that added and set-up in run time, since i activated the grouping functionality in the grid I still get JS error says ';' expected whenever i use (click) on one of grouping/sorting abilities, I activated script Debugging for IE, in the JS code turns out that there is no missing ';' and once i click ignore for the error msg that VS generates every thing works fine, and surly end-user can't see this msg so i figured out if i try/catch the script that may help avoid this error. Thanks in advance

    Read the article

  • Hibernate Annotation (Pyramid Structure - same table)

    - by fatnjazzy
    Hi, I have a person table that contains the following fields: id, name, parent_id. the parent_id is actually a FK for column id. the data should look like this (Like a pyramid): "id" "name" "parent_id" "1" "I am the Top Father" "1" "2" "My Father Is 1" "1" "3" "My Father Is 2" "2" "4" "My Father Is 2" "2" How is my bean suppose to look like? Thanks

    Read the article

  • How do I use SLIDE instead of FADE in a YUI Menu animation?

    - by Avry
    I'm using the following configuration for a menu that is attached to a button: var srchTypeMenuConfig = { shadow: false, effect: { effect: YAHOO.widget.ContainerEffect.FADE, duration: .25 } }; I get a nice fade in and out for my menu when I click on the button; I'd rather have it slide in and out though. I replace YAHOO.widget.ContainerEffect.FADE with YAHOO.widget.ContainerEffect.SLIDE and the menu doesn't appear. Is there a way for me to get YUI to give me the slide effect? Here's what I've done so far: 1) Looked at the examples. 2) Looked at some effects examples from DavGlass' blog. 3) Searched the forums for 'ContainerEffect.SLIDE'. 4) Searched SO for 'ContainerEffect.SLIDE [YUI]'. I haven't found any helpful information. I suspect that I need to add something to my configuration, but I don't understand why fade would work but slide doesn't.

    Read the article

  • How to read line after finding a pattern?

    - by Jonathan Low
    i've got a "CHANNEL(SYSTEM.DEF.SVRCONN) CHLTYPE(SVRCONN)" "id=3" what i want to do is to retrieve the id after i do a search on the file and found the first line. open (CHECKFILE8, "$file"); while (<CHECKFILE8>) #while loop to loop through each line in the file { chomp; #take out each line by line $datavalue = $_; #store into var , $datavalue. $datavalue =~ s/^\s+//; #Remove multiple spaces and change to 1 space from the front $datavalue =~ s/\s+$//; #Remove multiple spaces and change to 1 space from the back $datavalue =~ s/[ \t]+/ /g; #remove multiple "tabs" and replace with 1 space if($datavalue eq "CHANNEL(SYSTEM.DEF.SVRCONN) CHLTYPE(SVRCONN)") { // HOW TO READ THE NEXT LINE? } } } close(CHECKFILE8); } Thanks

    Read the article

  • get path of Array (PHP)

    - by Kawah Grafis
    i have an array input like this .. Array ( [0] => Array ( [0] => 42 ) [**42**] => Array ( [0] => 12 [1] => 14 ) [**14**] => Array ( [0] => 317 ) [317] => Array ( [0] => 319 ) [**12**] => Array ( [0] => 306 [1] => 307 ) [307] => Array ( [0] => 311 ) [306] => Array ( [0] => 309 ) ) and i want to get result array like bellow : $paths[]=array(42,12,306,309); $paths[]=array(42,12,307,311); $paths[]=array(42,14,317,319); see array input root in array input = 42 (index of array 0) 42 have child = 12, 14 12 have child = 306, 307 14 have child = 317 306 have child = 309 307 have child = 311 317 have child = 319 like this.. and output array insert into $paths $paths[0]=array(42,12,306,309); $paths[1]=array(42,12,307,311); $paths[2]=array(42,14,317,319);

    Read the article

  • Youtube video embed in WebView and MoviePlayer control

    - by Tronic
    hi, i embed a youtube video into a webview. the problem is: when i pop the current view (which includes the webview) from navigation controller, the the movie itself stops, but the audio is continues running. when i push the view controller on the navigation controller again, i can play the movie newly, but the old audio is still there. my webview code ids_ = [NSArray arrayWithObjects:@"2b84g38Z_60",@"3URx0tM-rMc",@"HZpi-2HVhq0",@"Hhns0DRPI44",@"hRuoxRQ4Q3k",@"lkMXwNBGRA8",@"tXGc6wWIFJo",@"uzGdEn8aW-Q",@"ZAoEBdt8C5M",@"vn8EJqt2BvQ",@"7Z_qRbjG6Ck",@"JspRcxGUijs"@"lM2lcVOh5YU",@"2b84g38Z_60",nil]; int numIds_ = [ids_ count]; NSLog(@"%d", arc4random()%numIds_); NSString *youTubeVideoHTML = [[NSString alloc] initWithFormat:@"<html><head></head><body style=\"margin:0;background-color:#000;\"><iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"365\" src=\"http://www.youtube.com/embed/%@\" frameborder=\"0\"></iframe></body></html>", [ids_ objectAtIndex:arc4random()%numIds_]]; NSLog(youTubeVideoHTML); [youtubeView loadHTMLString:youTubeVideoHTML baseURL:nil]; thanks in advance

    Read the article

  • how to initialized array value's into another new array.

    - by kiran kumar
    I have array distanceListArray.. 5 km, 10 km, 15km, 20 km, 25 km. distanceListArray is of appDelegate.class distanceArray count is 5. Now i do have another array. which have list of events data ... eventListArray is of DistanceClass call eventListArray. for 5 km its displays 10 events, for 10 km its display 20 events. Now i need to load data for each section from distanceListArray of eventListArray Into another new array. All Arrays's are NSMutableArray. I hope this makes ambiguity. please help try to help me out.

    Read the article

  • How to get value array of object using jquery

    - by Sthepen
    Hi there.. i have problem to get all element in array of object using jquery... i get this code from internet... var id = 123; var test = new Object(); test.Identification = id; test.Group = "users"; test.Persons = new Array(); test.Persons.push({"FirstName":" AA ","LastName":"LA"}); test.Persons.push({"FirstName":" BB ","LastName":"LBB"}); test.Persons.push({"FirstName":" CC","LastName":"LC"}); test.Persons.push({"FirstName":" DD","LastName":"LD"}); how to get each of "FirstName" and "LastName" in Persons using JQuery??

    Read the article

  • how to create a DataAccessLayer ?

    - by NIGHIL DAS
    hi, i am creating a database applicatin in .Net. I am using a DataAccessLayer for communicating .net objects with database but i am not sure that this class is correct or not Can anyone cross check it and rectify any mistakes namespace IDataaccess { #region Collection Class public class SPParamCollection : List<SPParams> { } public class SPParamReturnCollection : List<SPParams> { } #endregion #region struct public struct SPParams { public string Name { get; set; } public object Value { get; set; } public ParameterDirection ParamDirection { get; set; } public SqlDbType Type { get; set; } public int Size { get; set; } public string TypeName { get; set; } // public string datatype; } #endregion /// <summary> /// Interface DataAccess Layer implimentation New version /// </summary> public interface IDataAccess { DataTable getDataUsingSP(string spName); DataTable getDataUsingSP(string spName, SPParamCollection spParamCollection); DataSet getDataSetUsingSP(string spName); DataSet getDataSetUsingSP(string spName, SPParamCollection spParamCollection); SqlDataReader getDataReaderUsingSP(string spName); SqlDataReader getDataReaderUsingSP(string spName, SPParamCollection spParamCollection); int executeSP(string spName); int executeSP(string spName, SPParamCollection spParamCollection, bool addExtraParmas); int executeSP(string spName, SPParamCollection spParamCollection); DataTable getDataUsingSqlQuery(string strSqlQuery); int executeSqlQuery(string strSqlQuery); SPParamReturnCollection executeSPReturnParam(string spName, SPParamReturnCollection spParamReturnCollection); SPParamReturnCollection executeSPReturnParam(string spName, SPParamCollection spParamCollection, SPParamReturnCollection spParamReturnCollection); SPParamReturnCollection executeSPReturnParam(string spName, SPParamCollection spParamCollection, SPParamReturnCollection spParamReturnCollection, bool addExtraParmas); int executeSPReturnParam(string spName, SPParamCollection spParamCollection, ref SPParamReturnCollection spParamReturnCollection); object getScalarUsingSP(string spName); object getScalarUsingSP(string spName, SPParamCollection spParamCollection); } } using IDataaccess; namespace Dataaccess { /// <summary> /// Class DataAccess Layer implimentation New version /// </summary> public class DataAccess : IDataaccess.IDataAccess { #region Public variables static string Strcon; DataSet dts = new DataSet(); public DataAccess() { Strcon = sReadConnectionString(); } private string sReadConnectionString() { try { //dts.ReadXml("C:\\cnn.config"); //Strcon = dts.Tables[0].Rows[0][0].ToString(); //System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //Strcon = config.ConnectionStrings.ConnectionStrings["connectionString"].ConnectionString; // Add an Application Setting. //Strcon = "Data Source=192.168.50.103;Initial Catalog=erpDB;User ID=ipixerp1;Password=NogoXVc3"; Strcon = System.Configuration.ConfigurationManager.AppSettings["connection"]; //Strcon = System.Configuration.ConfigurationSettings.AppSettings[0].ToString(); } catch (Exception) { } return Strcon; } public SqlConnection connection; public SqlCommand cmd; public SqlDataAdapter adpt; public DataTable dt; public int intresult; public SqlDataReader sqdr; #endregion #region Public Methods public DataTable getDataUsingSP(string spName) { return getDataUsingSP(spName, null); } public DataTable getDataUsingSP(string spName, SPParamCollection spParamCollection) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); } cmd.CommandType = CommandType.StoredProcedure; cmd.CommandTimeout = 60; adpt = new SqlDataAdapter(cmd); dt = new DataTable(); adpt.Fill(dt); return (dt); } } } finally { connection.Close(); } } public DataSet getDataSetUsingSP(string spName) { return getDataSetUsingSP(spName, null); } public DataSet getDataSetUsingSP(string spName, SPParamCollection spParamCollection) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); } cmd.CommandType = CommandType.StoredProcedure; cmd.CommandTimeout = 60; adpt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adpt.Fill(ds); return ds; } } } finally { connection.Close(); } } public SqlDataReader getDataReaderUsingSP(string spName) { return getDataReaderUsingSP(spName, null); } public SqlDataReader getDataReaderUsingSP(string spName, SPParamCollection spParamCollection) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); } cmd.CommandType = CommandType.StoredProcedure; cmd.CommandTimeout = 60; sqdr = cmd.ExecuteReader(); return (sqdr); } } } finally { connection.Close(); } } public int executeSP(string spName) { return executeSP(spName, null); } public int executeSP(string spName, SPParamCollection spParamCollection, bool addExtraParmas) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { SqlParameter par = new SqlParameter(spParamCollection[count].Name, spParamCollection[count].Value); if (addExtraParmas) { par.TypeName = spParamCollection[count].TypeName; par.SqlDbType = spParamCollection[count].Type; } cmd.Parameters.Add(par); } cmd.CommandType = CommandType.StoredProcedure; cmd.CommandTimeout = 60; return (cmd.ExecuteNonQuery()); } } } finally { connection.Close(); } } public int executeSP(string spName, SPParamCollection spParamCollection) { return executeSP(spName, spParamCollection, false); } public DataTable getDataUsingSqlQuery(string strSqlQuery) { try { using (connection = new SqlConnection(Strcon)) connection.Open(); { using (cmd = new SqlCommand(strSqlQuery, connection)) { cmd.CommandType = CommandType.Text; cmd.CommandTimeout = 60; adpt = new SqlDataAdapter(cmd); dt = new DataTable(); adpt.Fill(dt); return (dt); } } } finally { connection.Close(); } } public int executeSqlQuery(string strSqlQuery) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(strSqlQuery, connection)) { cmd.CommandType = CommandType.Text; cmd.CommandTimeout = 60; intresult = cmd.ExecuteNonQuery(); return (intresult); } } } finally { connection.Close(); } } public SPParamReturnCollection executeSPReturnParam(string spName, SPParamReturnCollection spParamReturnCollection) { return executeSPReturnParam(spName, null, spParamReturnCollection); } public int executeSPReturnParam() { return 0; } public int executeSPReturnParam(string spName, SPParamCollection spParamCollection, ref SPParamReturnCollection spParamReturnCollection) { try { SPParamReturnCollection spParamReturned = new SPParamReturnCollection(); using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); } cmd.CommandType = CommandType.StoredProcedure; foreach (SPParams paramReturn in spParamReturnCollection) { SqlParameter _parmReturn = new SqlParameter(paramReturn.Name, paramReturn.Size); _parmReturn.Direction = paramReturn.ParamDirection; if (paramReturn.Size > 0) _parmReturn.Size = paramReturn.Size; else _parmReturn.Size = 32; _parmReturn.SqlDbType = paramReturn.Type; cmd.Parameters.Add(_parmReturn); } cmd.CommandTimeout = 60; intresult = cmd.ExecuteNonQuery(); connection.Close(); //for (int i = 0; i < spParamReturnCollection.Count; i++) //{ // spParamReturned.Add(new SPParams // { // Name = spParamReturnCollection[i].Name, // Value = cmd.Parameters[spParamReturnCollection[i].Name].Value // }); //} } } return intresult; } finally { connection.Close(); } } public SPParamReturnCollection executeSPReturnParam(string spName, SPParamCollection spParamCollection, SPParamReturnCollection spParamReturnCollection) { return executeSPReturnParam(spName, spParamCollection, spParamReturnCollection, false); } public SPParamReturnCollection executeSPReturnParam(string spName, SPParamCollection spParamCollection, SPParamReturnCollection spParamReturnCollection, bool addExtraParmas) { try { SPParamReturnCollection spParamReturned = new SPParamReturnCollection(); using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { //cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); SqlParameter par = new SqlParameter(spParamCollection[count].Name, spParamCollection[count].Value); if (addExtraParmas) { par.TypeName = spParamCollection[count].TypeName; par.SqlDbType = spParamCollection[count].Type; } cmd.Parameters.Add(par); } cmd.CommandType = CommandType.StoredProcedure; foreach (SPParams paramReturn in spParamReturnCollection) { SqlParameter _parmReturn = new SqlParameter(paramReturn.Name, paramReturn.Value); _parmReturn.Direction = paramReturn.ParamDirection; if (paramReturn.Size > 0) _parmReturn.Size = paramReturn.Size; else _parmReturn.Size = 32; _parmReturn.SqlDbType = paramReturn.Type; cmd.Parameters.Add(_parmReturn); } cmd.CommandTimeout = 60; cmd.ExecuteNonQuery(); connection.Close(); for (int i = 0; i < spParamReturnCollection.Count; i++) { spParamReturned.Add(new SPParams { Name = spParamReturnCollection[i].Name, Value = cmd.Parameters[spParamReturnCollection[i].Name].Value }); } } } return spParamReturned; } catch (Exception ex) { return null; } finally { connection.Close(); } } public object getScalarUsingSP(string spName) { return getScalarUsingSP(spName, null); } public object getScalarUsingSP(string spName, SPParamCollection spParamCollection) { try { using (connection = new SqlConnection(Strcon)) { connection.Open(); using (cmd = new SqlCommand(spName, connection)) { int count, param = 0; if (spParamCollection == null) { param = -1; } else { param = spParamCollection.Count; } for (count = 0; count < param; count++) { cmd.Parameters.AddWithValue(spParamCollection[count].Name, spParamCollection[count].Value); cmd.CommandTimeout = 60; } cmd.CommandType = CommandType.StoredProcedure; return cmd.ExecuteScalar(); } } } finally { connection.Close(); cmd.Dispose(); } } #endregion } }

    Read the article

  • Flowplayer RTMP streaming, mp4, Amazon Cloudfront and iPad/iPhone

    - by circey
    I've been working on a site where 2 video clips are streamed using Amazon Cloudfront and Flowplayer. You can see one video/page here: http://graemeclarkoration.org.au/gcorationp1.htm (works as a Highslide popup/modal window, hence the lack of adornment). While it works in all browsers and Android devices, I can't get it to work on an iPad or an iPhone; the page opens fine and the video box appears but the video never loads. Does anyone have any ideas how to fix or even why the video won't load? MTIA

    Read the article

  • Error(2,7): PLS-00428: an INTO clause is expected in this SELECT statement

    - by omgzor
    I'm trying to create this trigger and getting the following compiler errors: create or replace TRIGGER RESTAR_PLAZAS AFTER INSERT ON PLAN_VUELO BEGIN SELECT F.NRO_VUELO, M.CAPACIDAD, M.CAPACIDAD - COALESCE(( SELECT count(*) FROM PLAN_VUELO P WHERE P.NRO_VUELO = F.NRO_VUELO ), 0) as PLAZAS_DISPONIBLES FROM VUELO F INNER JOIN MODELO M ON M.ID = F.CODIGO_AVION; END RESTAR_PLAZAS; Error(2,7): PL/SQL: SQL Statement ignored Error(8,5): PL/SQL: ORA-00933: SQL command not properly ended Error(8,27): PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe Error(2,1): PLS-00428: an INTO clause is expected in this SELECT statement What's wrong with this trigger?

    Read the article

  • Jagged Array in C (3D)

    - by Daniel
    How could I do the following? double layer1[][3] = { {0.1,0.1,0.8}, {0.1,0.1,0.8}, {0.1,0.1,0.8}, {0.1,0.1,0.8} }; double layer2[][5] = { {0.1,0.1,0.1,0.1,0.8} }; double *upper[] = {layer1, layer2}; I read the following after trying different ideas; to no avail. jagged array in c I understand (I hope) that double **upper[] = {layer1, layer2}; Is similar to what I'd like, but would not work because the layers are not arrays of pointers. I am using C intentionally. I am trying to abstain from doing this (which works). double l10[] = {0.1,0.1,0.8}; //l11 etc double *l1[] = {l10,l11,l12,l13}; double l20[] = {0.1,0.1,0.1,0.1,0.8}; double *l2[] = {l20}; double **both[] = {l1, l2};

    Read the article

  • iPhone - Problem with in-app purchases

    - by Satyam svv
    I've created iPhone app with in-app purchase. Now, I'm in testing phase. I created provisioning profile com.satyam.testapp In iTunes connected I created the application and uploaded the images, screen shots, desscription etc. I also created two id's for in-app purchase. One is com.satyam.testapp.book1 and the other one is com.satyam.testapp.book5 I created test account also for verifying my in-app purchases. Using com.stayam.testapp i created developer test profile and using the same in my developed application. I logged out the itunes app store account in my iphone. Now i started running my application on my iphone. Its saying that no items are there to purchase. But its not even asking me for credentials where i've to enter test account username and password..... how to debug it? Here's my delegate: - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { NSArray *myProduct = [[NSArray alloc] initWithArray:response.products]; for(int i=0;i<[myProduct count];i++) { SKProduct *product = [myProduct objectAtIndex:i]; NSLog(@"Name: %@ - Price: %f",[product localizedTitle],[[product price] doubleValue]); NSLog(@"Product identifier: %@", [product productIdentifier]); } for(NSString *invalidProduct in response.invalidProductIdentifiers) NSLog(@"Problem in iTunes connect configuration for product: %@", invalidProduct); [request autorelease]; [myProduct release]; }

    Read the article

  • Delphi, PGDac vs Zeos, Fetch, Lookup?

    - by durumdara
    Hi! I used Zeos to test to know: is ZTable uses fetch technics, or not? May in the future we migrate our lesser system to PGSQL, and this used now "Table" components (as BDE, but it have an SQL-like server). These tables use real cursors, a "Window" with N record, so lookup is very fast, because the Locate/Lookup is started on server, and only these N records are refreshed, no matter, how many records in the lookup table. PGSQL uses fetch technics as I know, and I tested it with a table (id int, name varchar(100)), and 1 million records. (I also trying this with mysql). The adapter is Zeos. ID, sec to find, allocated memory in bytes on client. MySQL 500000 2,761 113 196 344 1000000 3,214 225 471 232 313800 0,437 225 471 232 328066 0,468 225 471 232 276374 0,390 225 471 232 905984 1,264 225 471 232 260253 0,359 225 471 232 PGSQL 500000 3,042 113 188 184 1000000 3,744 225 463 064 313800 0,436 225 463 064 328066 0,452 225 463 064 276374 0,375 225 463 064 905984 1,295 225 463 064 260253 0,359 225 463 064 142023 0,203 225 463 064 As you see the records are fetched locally, this cause the 225 MB usage, and searches are slow a little, based where is the record we must find. I want to ask more things: a.) Is PGDAC have some technics to we can use the lookups without pay the fetch with memory and secs? b.) Or is PG ODBC driver can help in this problem with ADO? (As I know ADO can use server side cursors)? c.) Have anybody some experience with lookup tables, and performance? Is this critical question or it is not? (With client memory usage too). d.) If no chance to avoid fetch hell with lookups, what we can do? Server Side Joins, and unique code for Lookup field changing without real Lookup? Thanks for your help: dd

    Read the article

  • Why does the infobox in my MSN Map not close?

    - by meder
    I'm having a bit of trouble with this map, invoked by the "View our interactive map" button in the middle of the content area. If you double click a point such as 8 which causes a zoom and then afterwards it causes the info box to appear, the hide logic is wrong. If you try to close the x, it will fail. This is probably because the user clicked too fast and the map thinks its in zoom mode when infact it should be in info box mode. Has anyone ran into this issue before? Looks like I have to mess around with window.ero.hide and some other functions.. because map.HideInfoBox doesn't hide the map. EDIT: The script used is here. I did not code it, but the relevant bit has: onclick="EnableEroHide();map.HideInfoBox();changePin();return false;" The map.HideInfoBox() should hide the info box.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >