Search Results

Search found 4140 results on 166 pages for 'alias analysis'.

Page 102/166 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • PHP String tokenizer not working correctly

    - by asdadas
    I have no clue why strtok decided to break on me. Here is my code. I am tokenizing a string by dollar symbol $. echo 'Tokenizing this by $: ',$aliases,PHP_EOL; if(strlen($aliases) > 0) { //aliases check $token = strtok($aliases, '$'); while($token != NULL) { echo 'Found a token: ',$token,PHP_EOL; if(!isGoodLookup($token)) { echo 'ERROR: Invalid alias found.',PHP_EOL; stop($db); } $goodAliasesList[] = $token; $token = strtok('$'); } if($token == NULL) echo 'Found null token, moving on',PHP_EOL; } And this is my output: Tokenizing this by $: getaways$aaa Found a token: getaways Found null token, moving on str tok is not supposed to do this!! where is my aaa token!!

    Read the article

  • MySql SELECT AS - Append all field names

    - by jeerose
    I'd like to do something like this: SELECT table.id AS prefix_id, table.name AS prefix_name ... and have the prefix added dynamically to all field names rather than selecting them all manually (ie SELECT table.* AS prefix_* or something) Hopefully I've described that accurately. Any thoughts? Edit To be clear, the reason I'm asking is to make sure that my query result contains every column from each table I call even if there are duplicate field names. For example, I might have a table with lots of fields which means I don't want to alias all the fields manually. Further if 3 tables have a field called name my result won't contain three name results; it will have one. I want to avoid ambiguity with my column names.

    Read the article

  • Use of (non) qualified names

    - by AProgrammer
    If I want to use the name baz defined in package foo|bar|quz, I've several choices: provide fbq as a short name for foo|bar|quz and use fbq|baz use foo|bar|quz|baz import baz from foo|bar|quz|baz and then use baz (or an alias given in the import process) import all public symbols from foo|bar|quz|baz and then use baz For the languages I know, my perception is that the best practice is to use the first two ways (I'll use one or the other depending on the specific package full name and the number of symbols I need from it). I'd use the third only in a language which doesn't provide the first and hunt for supporting tools to write the import statements. And in my opinion the fourth should be reserved to package designed with than import in mind, for instance if all exported symbols start with a prefix or contains the name of the package. My questions: what is in your opinion the best practice for your favorite languages? what would you suggest in a new language? what would you suggest in an old language adding such a feature?

    Read the article

  • start .net application from start menu search

    - by BorisT
    bla.exe (application alias) points to a .net application called wpfapp1.exe. When i add a key&value to eg. this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\bla.exe and then start application using Run - bla.exe it starts however when i start application using windows search i get an "windows cannot find wpfapp1.exe. make sure you typed the name correctly, and then try again." I have successfully identified problem: this error only occurs to .net applications while native one start normally (eg. firefox.exe). So is there any .net config that i've missed during development?

    Read the article

  • Is ruby ||= intelligent?

    - by brad
    I have a question regarding the ||= statement in ruby and this is of particular interest to me as I'm using it to write to memcache. What I'm wondering is, does ||= check the receiver first to see if it's set before calling that setter, or is it literally an alias to x = x || y This wouldn't really matter in the case of a normal variable but using something like: CACHE[:some_key] ||= "Some String" could possibly do a memcache write which is more expensive than a simple variable set. I couldn't find anything about ||= in the ruby api oddly enough so I haven't been able to answer this myself. Of course I know that: CACHE[:some_key] = "Some String" if CACHE[:some_key].nil? would achieve this, I'm just looking for the most terse syntax.

    Read the article

  • using Applescript to retrieve movie file duration via Finder properties

    - by Matt
    When using Get Info on movie files in the Finder, I've noticed that many movie files have an accessible "Duration" property under the More Info tab. Is there an easy way to access this data using Applescript? I've tried lines like "set theTime to (duration of aFile)", but it doesn't seem to be as simple as that. Ideally I'd like to access the movie duration via the Finder properties without having to actually open the file in QuickTime. Is this possible? Edit: I seem to have figured this out... you need to use the "System Events" application, specifically the Movie File Suite of commands (and, importantly, you need to set the movie variable as a string, rather than an alias): set theMovie to (choose file with prompt "Select a movie file:") as string tell application "System Events" set theName to name of movie file theMovie set theDuration to (duration of contents of movie file theMovie) / (time scale of contents of movie file theMovie) end tell

    Read the article

  • retrieve contact's nickname

    - by TomTasche
    Hello, I want to get the nickname of a contact from addressbook. I start with his phone number, query it and want the nickname (aka alias) as a result. Cursor cur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.NUMBER + " = " + incomingNumber, null, null); if (cur.moveToFirst()) { Log.e("saymyname", cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.NAME))); Log.e("saymyname", cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Nickname.LABEL))); } Output of the logs is the incomingNumber (first Log.e() ) and null (second Log.e() ), but I want to get the contact's nickname! Thanks Tom

    Read the article

  • Aggregate Functions on subsets of data based on current row values with SQL

    - by aasukisuki
    Hopefully that title makes sense... Let's say I have an employee table: ID | Name | Title | Salary ---------------------------- 1 | Bob | Manager | 15285 2 | Joe | Worker | 10250 3 | Al | Worker | 11050 4 | Paul | Manager | 16025 5 | John | Worker | 10450 What I'd like to do is write a query that will give me the above table, along with an averaged salary column, based on the employee title: ID | Name | Title | Salary | Pos Avg -------------------------------------- 1 | Bob | Manager | 15285 | 15655 2 | Joe | Worker | 10250 | 10583 3 | Al | Worker | 11050 | 10583 4 | Paul | Manager | 16025 | 15655 5 | John | Worker | 10450 | 10583 I've tried doing this with a sub-query along the lines of: Select *, (select Avg(e2.salary) from employee e2 where e2.title = e.title) from employee e But I've come to realize that the sub-query is executed first, and has no knowledge of the table alias'd e I'm sure I'm missing something REALLY obvious here, can anyone point me in the right diretion?

    Read the article

  • Completing install of ruby 1.9.3 with Ruby for for Mac OS X 10.7.5 Leopard, Xcode 4.5.2 -- problems with rvm pkg install openssl

    - by user1848361
    First, many thanks in advance for any help. I'm a complete novice with programming and I'm trying to get started with this Ruby on Rails tutorial (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2) I have been trying figure this out for about 7 hours now and since I don't have any hair left to pull out I'm turning to these hallowed pages. I have searched for solutions here again and again. System: Mac OS X 10.7.5 Leopard, Xcode 4.5.2 I installed homebrew and have updated it multiple times I used homebrew to install rvm and have updated it multiple times I installed git The standard ruby on the system (checking with $ ruby -v) is 1.8.7 My problem is that every time I try to use rvm to install a new version of Ruby ($ rvm install 1.9.3) I get the following error: Ruby (and needed base gems) for your selection will be installed shortly. Before it happens, please read and execute the instructions below. Please use a separate terminal to execute any additional commands. Notes for Mac OS X 10.7.5, Xcode 4.5.2. For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26" For IronRuby: Install Mono >= 2.6 For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba' For Opal: Install Nodejs with NPM. See http://nodejs.org/download/ To use an RVM installed Ruby as default, instead of the system ruby: rvm install 1.8.7 # installs patch 357: closest supported version rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems rvm alias create default 1.8.7 And reopen your terminal windows. Xcode and gcc: : I have performed $ brew install libksba and when I try to do it again it tells me that libksba is installed already. When I type "$ rvm requirements" I get: Notes for Mac OS X 10.7.5, Xcode 4.5.2. For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26" For IronRuby: Install Mono >= 2.6 For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba' For Opal: Install Nodejs with NPM. See http://nodejs.org/download/ To use an RVM installed Ruby as default, instead of the system ruby: rvm install 1.8.7 # installs patch 357: closest supported version rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems rvm alias create default 1.8.7 And reopen your terminal windows. Xcode and gcc: Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2. Xcode 4.1 and earlier: - Ruby will build fine. Xcode 4.2 and later (including Command Line Tools for Xcode): - If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine. - If you don't have gcc-4.2, you have two options to get it: * Install apple-gcc42 from Homebrew * Install osx-gcc-installer Homebrew: If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes: brew update brew tap homebrew/dupes brew install autoconf automake apple-gcc42 rvm pkg install openssl Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools. osx-gcc-installer: If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer. Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire. ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer. So I assume I have to do something with brew update brew tap homebrew/dupes brew install autoconf automake apple-gcc42 rvm pkg install openssl Everything seemed to work fine until "$ rvm pkg install openssl", which returns: Fetching openssl-1.0.1c.tar.gz to /Users/thierinvestmentservices/.rvm/archives Extracting openssl to /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c Configuring openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c. Compiling openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c. Error running 'make', please read /Users/thierinvestmentservices/.rvm/log/openssl/make.log Please note that it's required to reinstall all rubies: rvm reinstall all --force Updating openssl certificates Error running 'update_openssl_certs', please read /Users/thierinvestmentservices/.rvm/log/openssl.certs.log Johns-MacBook-Pro:~ thierinvestmentservices$ rvm pkg install openssl Fetching openssl-1.0.1c.tar.gz to /Users/thierinvestmentservices/.rvm/archives Extracting openssl to /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c Configuring openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c. Compiling openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c. Error running 'make', please read /Users/thierinvestmentservices/.rvm/log/openssl/make.log Please note that it's required to reinstall all rubies: rvm reinstall all --force Updating openssl certificates Error running 'update_openssl_certs', please read /Users/thierinvestmentservices/.rvm/log/openssl.certs.log make.log reads "[2012-11-23 13:15:28] make /Users/thierinvestmentservices/.rvm/scripts/functions/utility: line 116: make: command not found" and openssl.certs.log reads "[2012-11-23 14:04:04] update_openssl_certs update_openssl_certs () { ( chpwd_functions="" builtin cd $rvm_usr_path/ssl && command curl -O http://curl.haxx.se/ca/cacert.pem && mv cacert.pem cert.pem ) } current path: /Users/thierinvestmentservices command(1): update_openssl_certs /Users/thierinvestmentservices/.rvm/scripts/functions/pkg: line 205: cd: /Users/thierinvestmentservices/.rvm/usr/ssl: No such file or directory" At this point the letters might as well be wingdings I have no idea what is going on. I have tried to install rvm make with something I saw on one forum post but I got a bunch of warnings. If anyone has any suggestions I would be deeply grateful, I am completely in over my head,

    Read the article

  • CentOS: revert python version back to original

    - by NP
    Hi all, I installed python 2.6 using the instructions here on CentOS 5.4. However I realized it was a bad move and I need to revert back to 2.4, which was there originally. Can anyone guide me on how to undo what I did here? In particular, I am not sure how to undo this: Configure ld to find your shared libs: $ cat /etc/ld.so.conf.d/opt-python2.5.conf /opt/python2.5/lib (hit enter) (hit ctrl-d to return to shell) $ ldconfig I tried removing the alias and the symlink and even re-aliasing python to /usr/bin/python, but when I try to install an RPM i get this error: error: Failed dependencies: libpython2.4.so.1.0 is needed by ... Thanks in advance.

    Read the article

  • Understanding a skelton of jQuery plugin

    - by TK
    At a website, I found the following code to make a jQuery plugin: (function($){ // Our code here... })(jQuery); I don't understand how the code above works. What I understand is that the code executes immediately because the very last () in function(){}(). So the entire code says that is an anonymous function that is run immediately. But I don't understand why the wrapping needs to pass jQuery and that inside it needs $ to be passed. From my understanding, $ is an alias to jQuery, meaning practically the same. What is the meaning of $ and jQuery here? How does the overall code work as a jQuery plugin?

    Read the article

  • MySQL/SQL: Update with correlated subquery from the updated table itself

    - by Roee Adler
    I have a generic question that I will try to explain using an example. Say I have a table with the fields: "id", "name", "category", "appearances" and "ratio" The idea is that I have several items, each related to a single category and "appears" several times. The ratio field should include the percentage of each item's appearances out of the total number of appearances of items in the category. In pseudo-code what I need is the following: For each category find the total sum of appearances for items related to it. For example it can be done with (select sum("appearances") from table group by category) For each item set the ratio value as the item's appearances divided by the sum found for the category above Now I'm trying to achieve this with a single update query, but can't seem to do it. What I thought I should do is: update Table T set T.ratio = T.appearances / ( select sum(S.appearances) from Table S where S.id = T.id ) But MySQL does not accept the alias T in the update column, and I did not find other ways of achieving this. Any ideas?

    Read the article

  • AbsoluteTime with numeric argument behaves strangely.

    - by dreeves
    This is strange: DateList@AbsoluteTime[596523] returns {2078, 7, 2, 2, 42, 9.7849} But DateList@AbsoluteTime[596524] returns {1942, 5, 26, 20, 28, 39.5596} The question: What's going on? Note that AbsoluteTime with a numeric argument is undocumented. (I think I now know what it's doing but figured this is useful to have as a StackOverflow question for future reference; and I'm curious if there's some reason for that magic 596523 number.) PS: I encountered this when writing these utility functions for converting to and from unix time in Mathematica: (* Using Unix time (an integer) instead of Mathematica's AbsoluteTime... *) tm[x___] := AbsoluteTime[x] (* tm is an alias for AbsoluteTime. *) uepoch = tm[{1970}, TimeZone->0]; (* unixtm works analogously to tm. *) unixtm[x___] := Round[tm[x]-uepoch] (* tm & unixtm convert between unix & *) unixtm[x_?NumericQ] := Round[x-uepoch] (* mma epoch time when given numeric *) tm[t_?NumericQ] := t+uepoch (* args. Ie, they're inverses. *)

    Read the article

  • customising serialisation of java collections using xstream

    - by Will Goring
    I have an object that needs to be serialised as XML, which contains the following field: List<String> tags = new List<String>(); XStream serialises it just fine (after some aliases) like this: <tags> <string>tagOne</string> <string>tagTwo</string> <string>tagThree</string> <string>tagFour</string> </tags> That's OK as far as it goes, but I'd like to be able to rename the <string> elements to, say, <tag>. I can't see an obvious way to do that from the alias documentation on the XStream site. Am I missing something obvious?

    Read the article

  • Find directory on different server C#

    - by rainhider
    I have a website on Server A and it needs to find a directory on Server B. On my aspx page, I have: <mb:FileSystemDataSource ID="fileSystemDataSource" runat="server" RootPath="\\servername\Folder\Subfolder" FoldersOnly="true" /> mb is assembly name alias. On my aspx.cs page, I have: protected void Page_Load(object sender, EventArgs e) { DataTable gridviewSource = DisplayFilesInGridView(); DataRow gridviewRow; //sets the server path so it does not default to current server string ServerPath = System.IO.Path.Combine( "//", this.fileSystemDataSource.RootPath); //Get All Folders Or Directories and add in table DirectoryInfo directory = new DirectoryInfo(Server.MapPath(ServerPath)); DirectoryInfo[] subDirectories = directory.GetDirectories(); } Well, it throws an error on the Server.MapPath because it cannot find the server. I am connected to the network. I looked at IIS, and I am pretty sure that is not the problem. If so, I would really need specifics. Any help would be appreciated.

    Read the article

  • Trigger to update data in another DB

    - by Permana
    I have the following schema: Database: test. Table: per_login_user, Field: username (PK), password Database: wavinet. Table: login_user, Field: username (PK), password What I want to do is to create a trigger. Whenever a password field on table per_login_user in database test get updated, the same value will be copied to field password in Table login_wavinet in database wavinet I have search trough Google and find this solution: http://forums.devshed.com/ms-sql-development-95/use-trigger-to-update-data-in-another-db-149985.html But, when I run this query: CREATE TRIGGER trgPasswordUpdater ON dbo.per_login_user FOR UPDATE AS UPDATE wavinet.dbo.login_user SET password = I.password FROM inserted I INNER JOIN deleted D ON I.username = D.username WHERE wavinet.dbo.login_wavinet.password = D.password the query return error message: Msg 107, Level 16, State 3, Procedure trgPasswordUpdater, Line 4 The column prefix 'wavinet.dbo.login_wavinet' does not match with a table name or alias name used in the query.

    Read the article

  • Ado.Net Entity produces "namespace cannot be found"

    - by Dave
    I've seen several possible solutions to this, but none have worked for me. After adding a ADO.NET Entity Data Model to my .Net Forms C# web project, I am unable to use it. Perhaps I made a mistake adding it? The name of the file added is QcFormData.edmx. In my code, perhaps I'm instantiating it incorrectly? I tried adding the line: QcFormDataContainer db = new QcFormDataContainer(); It appears in Intellisense, but when compiling I get the error : Error 13 The type or namespace name 'QcFormDataContainer' could not be found (are you missing a using directive or an assembly reference?) I've followed the suggestions that I found online that did not help: 1) made sure there is "using System.Data.Entity" 2) made sure the dll exists. 3) made sure the reference exists. 4) one post said use using System.Web.Data.Entity; but I do not see that available. What am I missing? QcFormData.edmx <?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx"> <!-- EF Runtime content --> <edmx:Runtime> <!-- SSDL content --> <edmx:StorageModels> <Schema Namespace="MyCocoModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl"> <EntityContainer Name="MyCocoModelStoreContainer"> <EntitySet Name="QcFieldValues" EntityType="MyCocoModel.Store.QcFieldValues" store:Type="Tables" Schema="dbo" /> </EntityContainer> <EntityType Name="QcFieldValues"> <Key> <PropertyRef Name="ID" /> </Key> <Property Name="ID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" /> <Property Name="FieldID" Type="nvarchar" MaxLength="100" /> <Property Name="FieldValue" Type="nvarchar" MaxLength="100" /> <Property Name="DateTimeAdded" Type="datetime" /> <Property Name="OrderReserveNumber" Type="nvarchar" MaxLength="50" /> </EntityType> </Schema> </edmx:StorageModels> <!-- CSDL content --> <edmx:ConceptualModels> <Schema Namespace="MyCocoModel" Alias="Self" p1:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:p1="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"> <EntityContainer Name="MyCocoEntities" p1:LazyLoadingEnabled="true"> <EntitySet Name="QcFieldValues" EntityType="MyCocoModel.QcFieldValue" /> </EntityContainer> <EntityType Name="QcFieldValue"> <Key> <PropertyRef Name="ID" /> </Key> <Property Name="ID" Type="Int32" Nullable="false" p1:StoreGeneratedPattern="Identity" /> <Property Name="FieldID" Type="String" MaxLength="100" Unicode="true" FixedLength="false" /> <Property Name="FieldValue" Type="String" MaxLength="100" Unicode="true" FixedLength="false" /> <Property Name="DateTimeAdded" Type="DateTime" Precision="3" /> <Property Name="OrderReserveNumber" Type="String" MaxLength="50" Unicode="true" FixedLength="false" /> </EntityType> </Schema> </edmx:ConceptualModels> <!-- C-S mapping content --> <edmx:Mappings> <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs"> <EntityContainerMapping StorageEntityContainer="MyCocoModelStoreContainer" CdmEntityContainer="MyCocoEntities"> <EntitySetMapping Name="QcFieldValues"> <EntityTypeMapping TypeName="MyCocoModel.QcFieldValue"> <MappingFragment StoreEntitySet="QcFieldValues"> <ScalarProperty Name="ID" ColumnName="ID" /> <ScalarProperty Name="FieldID" ColumnName="FieldID" /> <ScalarProperty Name="FieldValue" ColumnName="FieldValue" /> <ScalarProperty Name="DateTimeAdded" ColumnName="DateTimeAdded" /> <ScalarProperty Name="OrderReserveNumber" ColumnName="OrderReserveNumber" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping> </EntityContainerMapping> </Mapping> </edmx:Mappings> </edmx:Runtime> <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) --> <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx"> <Connection> <DesignerInfoPropertySet> <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" /> </DesignerInfoPropertySet> </Connection> <Options> <DesignerInfoPropertySet> <DesignerProperty Name="ValidateOnBuild" Value="true" /> <DesignerProperty Name="EnablePluralization" Value="True" /> <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" /> <DesignerProperty Name="CodeGenerationStrategy" Value="None" /> </DesignerInfoPropertySet> </Options> <!-- Diagram content (shape and connector positions) --> <Diagrams></Diagrams> </Designer> </edmx:Edmx>

    Read the article

  • Any array function or user defined function to pick up only first occurence of value from the array?

    - by OM The Eternity
    If i have an array Array ( [0] => Array ( [0] => 137 [id] => 137 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => 0 [oldvalue] => 0 [5] => 62 [newvalue] => 62 [6] => checked_out [field] => checked_out [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:28 [changedone] => 2010-05-11 17:46:28 ) [1] => Array ( [0] => 138 [id] => 138 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => 0000-00-00 00:00:00 [oldvalue] => 0000-00-00 00:00:00 [5] => 2010-05-11 12:16:28 [newvalue] => 2010-05-11 12:16:28 [6] => checked_out_time [field] => checked_out_time [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:28 [changedone] => 2010-05-11 17:46:28 ) [2] => Array ( [0] => 139 [id] => 139 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => Subhash [oldvalue] => Subhash [5] => Subhashgfhfgh [newvalue] => Subhashgfhfgh [6] => name [field] => name [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:35 [changedone] => 2010-05-11 17:46:35 ) [3] => Array ( [0] => 140 [id] => 140 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => subhash [oldvalue] => subhash [5] => subhashhfhf [newvalue] => subhashhfhf [6] => alias [field] => alias [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:35 [changedone] => 2010-05-11 17:46:35 ) [4] => Array ( [0] => 141 [id] => 141 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => 62 [oldvalue] => 62 [5] => 0 [newvalue] => 0 [6] => checked_out [field] => checked_out [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:35 [changedone] => 2010-05-11 17:46:35 ) [5] => Array ( [0] => 142 [id] => 142 [1] => 153 [trackid] => 153 [2] => jos_menu [table_name] => jos_menu [3] => UPDATE [operation] => UPDATE [4] => 2010-05-11 12:16:28 [oldvalue] => 2010-05-11 12:16:28 [5] => 0000-00-00 00:00:00 [newvalue] => 0000-00-00 00:00:00 [6] => checked_out_time [field] => checked_out_time [7] => 0 [live] => 0 [8] => 2010-05-11 17:46:35 [changedone] => 2010-05-11 17:46:35 ) ) Now here u can see that the index "field" has repeated values i.e. "checked_out" and "checked_out_time" other indexes have single occurrence, now what should I do to select/grab the first occurrence of the repetitive values only?

    Read the article

  • Understanding a skeleton of jQuery plugin

    - by TK
    At a website, I found the following code to make a jQuery plugin: (function($){ // Our code here... })(jQuery); I don't understand how the code above works. What I understand is that the code executes immediately because the very last () in function(){}(). So the entire code says that is an anonymous function that is run immediately. But I don't understand why the wrapping needs to pass jQuery and that inside it needs $ to be passed. From my understanding, $ is an alias to jQuery, meaning practically the same. What is the meaning of $ and jQuery here? How does the overall code work as a jQuery plugin?

    Read the article

  • How to unmangle exported symbols from C++ in dynamic libraries in XCode on OSX

    - by Gerald
    I've been trying to develop a dynamic library in C++ that can be run-time loaded in an application. I finally got it working, but it's a little ugly. I have a function that takes a pointer to a C++ class as an argument, which looks like this: bool registerGrindPlugin( Grind::PluginManager* mgr ); But of course it's being exported as: _Z19registerGrindPluginPN5Grind13PluginManagerE I tried a .c file with a simple function and it exported fine as "registerGrindPlugin", but of course I can't pass a C++ class as the argument that way. Soo... my question is, is there a way to unmangle or alias the exported symbol so that I don't have to use a monstrosity like Z19registerGrindPluginPN5Grind13PluginManagerE in my dlsym call? I did see something about -alias_list as a linker option, but I haven't quite figured out how to use it in XCode. If that is the solution, can somebody provide some more details on how to use this?

    Read the article

  • MySQL Inserting into locked aliased table

    - by Whitey
    I am trying to insert data into a InnoDB MySQL table which is locked using an alias and I cannot for the life of me get it to work! The following works: LOCK TABLES Problems p1 WRITE, Problems p2 WRITE, Server READ; SELECT * FROM Problems p1; UNLOCK TABLES; But try and do an insert and it doesn't work (it claims there is a syntax error round the 'p1' in my INSERT): LOCK TABLES Problems p1 WRITE, Problems p2 WRITE, Server READ; INSERT INTO Problems p1 (SomeCol) VALUES(43534); UNLOCK TABLES; Help please!

    Read the article

  • Query for value where a default namespace node exists

    - by Jay
    I have the following XML that is provided to me and I cannot change it: <Parent> <Settings Version="1234" xmlns="urn:schemas-stuff-com"/> </Parent> I am trying to retrieve the "Version" attribute value using XPath. It appears since the xmlns is defined without an alias it automatically assigns that xmlns to the Settings node. When I read this XML into an XMLDocument and view the namespaceURI value for the Settings node it is set to "urn:schemas-stuff-com". I have tried: //Parent/Settings/@Version - returns Null //Parent/urn:schemas-stuff-com:Settings/@Version - invalid syntax

    Read the article

  • Difference in select for update of ... in Oracle Database 10g and 11g

    - by sax
    Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience): DECLARE v_ename bonus.ename%TYPE; BEGIN SELECT b.ename INTO v_ename FROM bonus b JOIN emp e ON b.ename = e.ename JOIN dept d ON d.deptno = e.deptno WHERE b.ename = 'Scott' FOR UPDATE OF b.ename; END; / While in 10g (10.2) this code ends successfully (well NO_DATA_FOUND exception is raised but that is expected), in 11g (11.2) it raises exception "column ambiguously defined". And that is definitely not expected. It seems like it does not take into account table alias because I found out that when I change the column in FOR UPDATE OF e.empno (also does not work) to e.mgr (which is unique) it starts working. So is this some error in 11g? Any thoughts?

    Read the article

  • SELECT(IF(IN query.

    - by Harold
    There are 3 tables. Products, Options and Prod_Opts_relations. The latter holds product_id and option_id so i should be able to figure out which options are selected for any given product. Now i want to retrieve all options from the options table where the value of an extra alias field should hold checked or unchecked depending on the existance of a mathing record in the relations table for a give product id. Thus far i came up with this: SELECT IF(IN(SELECT id_option FROM prod_opt_relations WHERE id_product='18'),'y','n') AS booh ,optionstable.id AS parent_id ,optionstable.name_en AS parent_english ,optionstable.name_es AS parent_spanish FROM product_options AS optionstable WHERE 1 resulting in syntax errors. Alas i just cannot figure out where things go wrong here

    Read the article

  • vb.net Is there a simple way to add a sound to a button click

    - by user867621
    Is there a simple way of doing this I found this online and I am getting an error Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" _ (ByVal filename As String, ByVal snd_async As Long) As Long Function PlaySound(ByVal sWavFile As String) ' Purpose: Plays a sound. ' Argument: the full path and file name. If apisndPlaySound(sWavFile, 1) = 0 Then MsgBox("The Sound Did Not Play!") End If End Function A call to PInvoke function 'WindowsApplication3!WindowsApplication3.Module1::apisndPlaySound' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >