Search Results

Search found 45031 results on 1802 pages for 'same name'.

Page 60/1802 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Table Name is null in the sqlite database in android device

    - by Mahe
    I am building a simple app which stores some contacts and retrieves contacts in android phone device. I have created my own database and a table and inserting the values to the table in phone. My phone is not rooted. So I cannot access the files, but I see that values are stored in the table. And tested on a emulator also. Till here it is fine. Display all the contacts in a list by fetching data from table. This is also fine. But the problem is When I am trying to delete the record, it shows the table name is null in the logcat(not an exception), and the data is not deleted. But in emulator the data is getting deleted from table. I am not able to achieve this through phone. This is my code for deleting, public boolean onContextItemSelected(MenuItem item) { super.onContextItemSelected(item); AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item .getMenuInfo(); int menuItemIndex = item.getItemId(); String[] menuItems = getResources().getStringArray(R.array.menu); String menuItemName = menuItems[menuItemIndex]; String listItemName = Customers[info.position]; if (item.getTitle().toString().equalsIgnoreCase("Delete")) { Toast.makeText( context, "Selected List item is: " + listItemName + "MenuItem is: " + menuItemName, Toast.LENGTH_LONG).show(); DB = context.openOrCreateDatabase("CustomerDetails.db", MODE_PRIVATE, null); try { int pos = info.position; pos = pos + 1; Log.d("", "customers[pos]: " + Customers[info.position]); Cursor c = DB .rawQuery( "Select customer_id,first_name,last_name from CustomerInfo", null); int rowCount = c.getCount(); DB.delete(Table_name, "customer_id" + "=" + String.valueOf(pos), null); DB.close(); Log.d("", "" + String.valueOf(pos)); Toast.makeText(context, "Deleted Customer", Toast.LENGTH_LONG) .show(); // Customers[info.position]=null; getCustomers(); } catch (Exception e) { Toast.makeText(context, "Delete unsuccessfull", Toast.LENGTH_LONG).show(); } } this is my logcat, 07-02 10:12:42.976: D/Cursor(1560): Database path: CustomerDetails.db 07-02 10:12:42.976: D/Cursor(1560): Table name : null 07-02 10:12:42.984: D/Cursor(1560): Database path: CustomerDetails.db 07-02 10:12:42.984: D/Cursor(1560): Table name : null Don't know the reason why data is not being deleted. Data exists in the table. This is the specification I have given for creating the table public static String customer_id="customer_id"; public static String site_id="site_id"; public static String last_name="last_name"; public static String first_name="first_name"; public static String phone_number="phone_number"; public static String address="address"; public static String city="city"; public static String state="state"; public static String zip="zip"; public static String email_address="email_address"; public static String custlat="custlat"; public static String custlng="custlng"; public static String Table_name="CustomerInfo"; final SQLiteDatabase DB = context.openOrCreateDatabase( "CustomerDetails.db", MODE_PRIVATE, null); final String CREATE_TABLE = "create table if not exists " + Table_name + " (" + customer_id + " integer primary key autoincrement, " + first_name + " text not null, " + last_name + " text not null, " + phone_number+ " integer not null, " + address+ " text not null, " + city+ " text not null, " + state+ " text not null, " + zip+ " integer not null, " + email_address+ " text not null, " + custlat+ " double, " + custlng+ " double " +" );"; DB.execSQL(CREATE_TABLE); DB.close(); Please correct my code. I am struggling from two days. Any help is appreciated!!

    Read the article

  • Opening a file with a variable as name & checking for undefined values

    - by Harm De Weirdt
    Hello everyone. I'm having some problems writing data into a file using perl. sub startNewOrder{ my $name = makeUniqueFileName(); open (ORDER, ">$name.txt") or die "can't open file: $!\n"; format ORDER_TOP = PRODUCT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CODE<<<<<<<<AANTAL<<<<EENHEIDSPRIJS<<<<<<TOTAAL<<<<<<< . format ORDER = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<< @<<<< @<<<<<< @<<<<< $title, $code, $amount, $price, $total . close (ORDER); } This is the sub I use to make the file. (I translated most of it) The makeUniqueFileName method makes a fileName based upon current time("minuteshoursdayOrder"). The problem now is that I have to write in this file in another sub. sub addToOrder{ print "give productcode:"; $code = <STDIN>; chop $code; print "Give amount:"; $amount = <STDIN>; chop $amount; if($inventory{$code} eq undef){ #Does the product exist? print "This product does not exist"; }elsif($inventory{$code}[2] < $amount && !defined($inventaris{$code}[2]) ){ #Is there enough in the inventory? print "There is not enough in stock" }else{ $inventory{$code}[2] -= $amount; #write in order file open (ORDER ">>$naam.txt") or die "can't open file: $!\n"; $title = $inventory{$code}[0]; $code = $code; $amount = $inventory{$code}[2]; $price = $inventory{$code}[1]; $total = $inventory{$code}[1]; write; close(ORDER); } %inventory is a hashtable that has the productcode as key and an array with the title, price and amount as value. There are two problems here: when I enter an invalid product number, I still have to enter an amount even while my code says it should print the error directly after checking if there is a product with the given code. The second problem is that the writing doesn't seem to work. It always give's a "No such file or directory" error. Is there a way to open the ORDER file i made in the first sub without having to make $name not local? Or just a way to write in this file? I really don't know how to start here. I can't really find much info on writing a file that has been closed before, and in a different sub.. Any help is appreciated, Harm

    Read the article

  • PHP & MySQL database storing the name Array problem.

    - by comma
    I'm new to PHP & MySQL and I keep getting the word Array stored in my MySQL tables fields $skill, $experience, $yearsI was wondering how can I fix this problem? And I know I need to add mysqli_real_escape_string which I left out to make code more easier to read Hopefully. Here is the PHP & MySQL code. if (isset($_POST['info_submitted'])) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT learned_skills.*, users_skills.* FROM learned_skills INNER JOIN users_skills ON learned_skills.id = users_skills.skill_id WHERE user_id='$user_id'"); if (!$dbc) { print mysqli_error($mysqli); return; } $user_id = '5'; $skill = $_POST['skill']; $experience = $_POST['experience']; $years = $_POST['years']; if (isset($_POST['skill'][0]) && trim($_POST['skill'][0])!=='') { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT learned_skills.*, users_skills.* FROM learned_skills INNER JOIN users_skills ON users_skills.skill_id = learned_skills.id WHERE users_skills.user_id='$user_id'"); if (mysqli_num_rows($dbc) == 0) { for ($s = 0; $s < count($skill); $s++){ for ($x = 0; $x < count($experience); $x++){ for ($g = 0; $g < count($years); $g++){ $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $query1 = mysqli_query($mysqli,"INSERT INTO learned_skills (skill, experience, years) VALUES ('" . $s . "', '" . $x . "', '" . $g . "')"); $id = mysqli_insert_id($mysqli); if ($query1 == TRUE) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $query2 = mysqli_query($mysqli,"INSERT INTO users_skills (skill_id, user_id) VALUES ('$id', '$user_id')"); } } } } } } } Here is the XHTML code. <li><label for="skill">Skill: </label><input type="text" name="skill[0]" id="skill[0]" /> <label for="experience">Experience: </label> <?php echo '<select id="experience[0]" name="experience[0]">' . "\n"; foreach($experience_options as $option) { if ($option == $experience) { echo '<option value="' . $option . '" selected="selected">' . $option . '</option>' . "\n"; } else { echo '<option value="'. $option . '">' . $option . '</option>'."\n"; } } echo '</select>'; ?> <label for="years">Years: </label> <?php echo '<select id="years[0]" name="years[0]">' . "\n"; foreach($grade_options as $option) { if ($option == $years) { echo '<option value="' . $option . '" selected="selected">' . $option . '</option>' . "\n"; } else { echo '<option value="'. $option . '">' . $option . '</option>'."\n"; } } echo '</select>'; ?> </li>

    Read the article

  • Opening a file with a variable as name and checking for undefined values

    - by Harm De Weirdt
    I'm having some problems writing data into a file using Perl. sub startNewOrder{ my $name = makeUniqueFileName(); open (ORDER, ">$name.txt") or die "can't open file: $!\n"; format ORDER_TOP = PRODUCT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CODE<<<<<<<<AANTAL<<<<EENHEIDSPRIJS<<<<<<TOTAAL<<<<<<< . format ORDER = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<< @<<<< @<<<<<< @<<<<< $title, $code, $amount, $price, $total . close (ORDER); } This is the sub I use to make the file. (I translated most of it.) The makeUniqueFileName method makes a fileName based upon current time("minuteshoursdayOrder"). The problem now is that I have to write to this file in another sub. sub addToOrder{ print "give productcode:"; $code = <STDIN>; chop $code; print "Give amount:"; $amount = <STDIN>; chop $amount; if($inventory{$code} eq undef){ #Does the product exist? print "This product does not exist"; }elsif($inventory{$code}[2] < $amount && !defined($inventaris{$code}[2]) ){ #Is there enough in the inventory? print "There is not enough in stock" }else{ $inventory{$code}[2] -= $amount; #write in order file open (ORDER ">>$naam.txt") or die "can't open file: $!\n"; $title = $inventory{$code}[0]; $code = $code; $amount = $inventory{$code}[2]; $price = $inventory{$code}[1]; $total = $inventory{$code}[1]; write; close(ORDER); } %inventory is a hashtable that has the productcode as key and an array with the title, price and amount as value. There are two problems here: when I enter an invalid product number, I still have to enter an amount even while my code says it should print the error directly after checking if there is a product with the given code. The second problem is that the writing doesn't seem to work. It always give's a "No such file or directory" error. Is there a way to open the ORDER file I made in the first sub without having to make $name not local? Or just a way to write in this file? I really don't know how to start here. I can't really find much info on writing a file that has been closed before, and in a different sub. Any help is appreciated, Harm

    Read the article

  • How to get friendly device name from DEV_BROADCAST_DEVICEINTERFACE and Device Instance ID

    - by snicker
    I've registered a window with RegisterDeviceNotification and can successfully recieve DEV_BROADCAST_DEVICEINTERFACE messages. However, the dbcc_name field in the returned struct is always empty. The struct I have is defined as such: [StructLayout(LayoutKind.Sequential)] public struct DEV_BROADCAST_DEVICEINTERFACE { public int dbcc_size; public int dbcc_devicetype; public int dbcc_reserved; public Guid dbcc_classguid; [MarshalAs(UnmanagedType.LPStr)] public string dbcc_name; } And I'm using Marshal.PtrToStructure on the LParam of the WM_DEVICECHANGE message. Should this be working? Or even better... Is there an alternative way to get the name of a device upon connection? EDIT (02/05/2010 20:56GMT): I found out how to get the dbcc_name field to populate by doing this: [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEV_BROADCAST_DEVICEINTERFACE { public int dbcc_size; public int dbcc_devicetype; public int dbcc_reserved; public Guid dbcc_classguid; [MarshalAs(UnmanagedType.ByValTStr, SizeConst=255)] public string dbcc_name; } but I still need a way to get a "Friendly" name from what is int dbcc_name. It looks like the following: \?\USB#VID_05AC&PID_1294&MI_00#0#{6bdd1fc6-810f-11d0-bec7-08002be2092f} And I really just want it to say "Apple iPhone" (which is what the device is in this case).

    Read the article

  • "The name 'WithTable' does not exist in the current context" using Fluent NHibernate

    - by Byron Sommardahl
    Might be a really easy problem to fix, but it the solution is eluding me! I'm using Fluent NHibernate 1.0 RTM (and using NHibernate bins that ships with it). I'm trying to map my entities and cannot use the WithTable() method. It's not available in Intelligence and VS doesn't suggest any namespaces to reference. Here's my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using GeoCodeThe.Net.Domain.Entities; using FluentNHibernate.Mapping; namespace GeoCodeThe.Net.Domain.Mappings { class CategoryMap: ClassMap<ICategory> { public CategoryMap() { WithTable("Categories"); // <----- Compile error: The name 'WithTable' does not exist in the current context Id(x => x.Id); Map(x => x.Name); Map(x => x.Tags); } } My bin folder has: Antlr3.Runtime.dll Castle.Core.dll Castle.DynamicProxy2.dll FluentNHibernate.dll Iesi.Collections.dll log4net.dll NHibernate.ByteCode.Castle.dll NHibernate.dll FluentNHibernate.pdb Castle.Core.xml Castle.DynamicProxy2.xml FluentNHibernate.xml Iesi.Collections.xml log4net.xml NHibernate.ByteCode.Castle.xml NHibernate.xml Any clue what I'm missing? Let me know if you need any more clarification.

    Read the article

  • git-p4 submit fails with "Not a valid object name HEAD~261"

    - by Harlan
    I've got a git repository that I'd like to mirror to a Perforce repository. I've downloaded the git-p4 script (the more recent version that doesn't give deprecation warnings), and have been working with that. I've figured out how to pull changes from Perforce, but I'm getting an error when I try to sync changes from the git repo back. Here's what I've done so far: git clone [email protected]:asdf/qwerty.git git-p4 sync //depot/path/to/querty git merge remotes/p4/master (there was a single README file...) So, I've copied the origin to a clean, new director, got a lovely looking merged tree of files, and git status shows I'm up-to-date. But: > git-p4 submit fatal: Not a valid object name HEAD~261 Command failed: git cat-file commit HEAD~261 This thread on the git mailing list seems to be relevant, but I can't figure out what they're doing with all the A, B, and Cs. Could someone please clarify what "Not a valid object name" means, and what I can do to fix the problem? All I want to do is to periodically snapshot the origin/master into Perforce; a full history is not required. Thanks.

    Read the article

  • Filtering log4net on method name - can't quite get it

    - by Mike Kingscott
    I'm using log4net to log my web app's progress, using Log4PostSharp to AOP-injectify all methods. This has the desired effect of logging (almost) everything and is fine. I now have a requirement to log JUST Page_Load methods to a file / console. I can obviously hamstring the log4postsharp class to do that, but then I'd be losing all the other logging. I've been looking at filters in log4net, starting with the StringMatch filter, but that only looks at the message being logged, and I'm after the method name. This put me onto the PropertyFilter, but still with no joy. My log4net.config snippet is thus: <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <filter type="log4net.Filter.PropertyFilter"> <key value="LocationInfo.MethodName"/> <stringToMatch value="Page_Load"/> </filter> <file value="d:\\xxxx\\yyyyy\\zzzzLog"/> As you can see, I'm trying to key into the MethodName of the logging event via LocationInfo, but I'm still getting everything logged. Can anyone assist? Thank you, Mike K.

    Read the article

  • How can you change Network settings (IP Address, DNS, WINS, Host Name) with code in C#

    - by rathkopf
    I am developing a wizard for a machine that is to be used as a backup of other machines. When it replaces an existing machine, it needs to set its IP address, DNS, WINS, and host name to match the machine being replaced. Is there a library in .net (C#) which allows me to do this programatically? There are multiple NICs, each which need to be set individually. EDIT Thannk you TimothyP for your example. It got me moving on the right track and the quick reply was awesome. Thanks balexandre. Your code is perfect. I was in a rush and had already adapted the example TimothyP linked to, but I would have loved to have had your code sooner. I've also developed a routine using similar techniques for changing the computer name. I'll post it in the future so subscribe to this questions RSS feed if you want to be informed of the update. I may get it up later today or on Monday after a bit of cleanup.

    Read the article

  • Jquery Json dynamic variable name generation

    - by PlanetUnknown
    I make a jquery .ajax call and I'm expecting a json result. The catch is, if there are say 5 authors, I'll get author_details_0, author_details_1, author_details_2, etc.... How can I dynamically construct the name of the variable to retrieve from json ? I don't know how many authors I'll get, there could be hundreds. $.ajax({ type: "POST", url: "/authordetails/show_my_details/", data: af_pTempString, dataType: "json", beforeSend: function() { }, success: function(jsonData) { console.log("Incoming from backend : " + jsonData.toSource()); if(jsonData.AuthorCount) { console.log("Number of Authors : " + jsonData.AuthorCount); for (i = 0; i < jsonData.AuthorCount; i++) { temp = 'author_details_' + i; <-------------------This is the name of the variable I'm expecting. console.log("Farm information : " + eval(jsonData.temp) ); <----- This doesn't work, how can I get jsonData.author_details_2 for example, 'coz I don't know how many authors are there, there could be hundreds. } } Please let me know if you have any idea how to solve this ! Much appreciated.

    Read the article

  • org.hibernate.hql.ast.QuerySyntaxException: TABLE NAME is not mapped

    - by Coronatus
    I have two models, Item and ShopSection. They have a many-to-many relationship. @Entity(name = "item") public class Item extends Model { @ManyToMany(cascade = CascadeType.PERSIST) public Set<ShopSection> sections; } @Entity(name = "shop_section") public class ShopSection extends Model { public List<Item> findActiveItems(int page, int length) { return Item.find("select distinct i from Item i join i.sections as s where s.id = ?", id).fetch(page, length); } } findActiveItems is meant to find items in a section, but I get this error: org.hibernate.hql.ast.QuerySyntaxException: Item is not mapped [select distinct i from Item i join i.sections as s where s.id = ?] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180) at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:111) at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:93) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:322) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3441) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3325) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:733) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:584) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:244) at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:272) ... 8 more What am I doing wrong?

    Read the article

  • JPA/Hibernate query with class name?

    - by Petteri Hietavirta
    In this example com.test.Cat extends com.test.Animal and there is no field DB in CAT table of com.test.Cat explicitly defining its type (it wasn't me). When I query my animals from DB I get a collection of Animals. It is possible to sort them by class name: order by r.class but is there a way to use class name as a criteria? For example I would like to get all animals expect dogs. But no luck - even this does not work: where r.class = ? (String "ccc.test.Cat") as I get an exception: Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at org.hibernate.type.IntegerType.set(IntegerType.java:64) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:154) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136) at org.hibernate.param.PositionalParameterSpecification.bind(PositionalParameterSpecification.java:62) at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:514) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1589) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)

    Read the article

  • Jackrabbit version delete -- name is unexpected

    - by Scudworth
    I'm using Apache Jackrabbit to store versioned data. I'm following the template listed on the Jackrabbit wiki for versioning basics, but there's one thing that isn't working as expected. After I run the code from the wiki, I try saving another version of the node, then getting its version string: child = parentNode.getNode("childNode"); child.checkout(); child.setProperty("anyProperty", "Blah3"); session.save(); Version thisVersion = child.checkin(); System.out.println(thisVersion.getName()); The output of this code is 1.0.0 , when I want it to be 1.1 . My goal is to be able to remove the last -- and only the last -- version of a node, and have the next version have the same name as the removed version. I only care about doing this when the node is being added; if I can check in the node, and read the name (to get the version number) without an exception being thrown, I'm fine with not being able to remove the version. Looking around the internet, I can't find a way to accomplish this.

    Read the article

  • Pass a data.frame column name to a function

    - by Kevin Middleton
    I'm trying to write a function to accept a data.frame (x) and a column from it. The function performs some calculations on x and later returns another data.frame. I'm stuck on the best-practices method to pass the column name to the function. The two minimal examples fun1 and fun2 below produce the desired result, being able to perform operations on x$column, using max() as an example. However, both rely on the seemingly (at least to me) inelegant (1) call to substitute() and possibly eval() and (2) the need to pass the column name as a character vector. fun1 <- function(x, column){ do.call("max", list(substitute(x[a], list(a = column)))) } fun2 <- function(x, column){ max(eval((substitute(x[a], list(a = column))))) } df <- data.frame(A = 1:20, B = rnorm(10)) fun1(df, "B") fun2(df, "B") I would like to be able to call the function as fun(df, B), for example. Other options I have considered but have not tried: Pass column as an integer of the column number. I think this would avoid substitute(). Ideally, the function could accept either. with(x, get(column)), but, even if it works, I think this would still require substitute Make use of formula() and match.call(), neither of which I have much experience with. Subquestion: Is do.call() preferred over eval()? Thanks, Kevin

    Read the article

  • Are dots legal in the name property of an HTML button

    - by justSteve
    a page with a bit of MVC code: <%=Html.SubmitButton("ChooseWebinar.Submit", "Continue to Registration Details")%><br/> that generates an input button where the '.' is embedded in the name: [rendered html] At page load this control (the submit button) is hidden - when one of two different dropdowns registers a value, the button is shown: function toggleChooseWebinarSubmit() { if ($("#ChooseWebinar_RecordedWebinarId").val() || $("#ChooseWebinar_UpcomingWebinarId").val()) { $("#ChooseWebinar_Submit").show(); } else { $("#ChooseWebinar_Submit").hide(); } I've just received a report from an IE8 user who says that after selecting a value in a dropdown, the button is _not displaying. I can't reproduce the condition (i've tried compatibility mode too). Obviously the show/hide is targeting the 'ID' selector but i can't help but wonder about that period in the control's name. Any known issues? - or perhaps the .change is problematic and the toggle's never getting called: $(window).load(function() { toggleChooseWebinarSubmit(); $("#ChooseWebinar_UpcomingWebinarId").change(function() { if ($(this).val()) { $("#ChooseWebinar_RecordedWebinarId").val(""); } toggleChooseWebinarSubmit(); }); $("#ChooseWebinar_RecordedWebinarId").change(function() { if ($(this).val()) { $("#ChooseWebinar_UpcomingWebinarId").val(""); } toggleChooseWebinarSubmit(); }); }); thx

    Read the article

  • INSERT INTO sql server error : invalid object name

    - by thormayer
    I have a problem with some statement on SQL SERVER the error I get is that I have an invalid object name 'TBL_VIDEOS' INSERT INTO TBL_VIDEOS ( TBL_VIDEOS.ID, TBL_VIDEOS.TITLE, TBL_VIDEOS.V_DESCRIPTION, TBL_VIDEOS.UPLOAD_DATE, TBL_VIDEOS.V_VIEWS, TBL_VIDEOS.USERNAME, TBL_VIDEOS.RATING, TBL_VIDEOS.V_SOURCE, TBL_VIDEOS.FLAG ) VALUES ('Z8MTRH3LmTVm', 'Why Creativity is the New Economy', 'Dr Richard Florida, one of the world&#39;s leading experts on economic competitiveness, demographic trends and cultural and technological innovation shows how developing the full human and creative capabilities of each individual, combined with institutional supports such as commercial innovation and new industry, will put us back on the path to economic and social prosperity. Listen to the podcast of the full event including audience Q&amp;A: http://www.thersa.org/events/audio-and-past-events/2012/why-creativity-is-the-new-economy Our events are made possible with the support of our Fellowship. Support us by donating or applying to become a Fellow. Donate: http://www.thersa.org/support-the-rsa Become a Fellow: http://www.thersa.org/fellowship/apply', CURRENT_TIMESTAMP, 0, 1, 0, 'http://www.youtube.com/watch?v=VPX7gowr2vE&feature=g-all-u' ,0) and I wonder what i've done wrong ? (btw, the error refer to line 1.. guess its the table name.. but it correct!

    Read the article

  • Directly call distutils' or setuptools' setup() function with command name/options, without parsing

    - by Ryan B. Lynch
    I'd like to call Python's distutils' or setuptools' setup() function in a slightly unconventional way, but I'm not sure whether distutils is meant for this kind of usage. As an example, let's say I currently have a 'setup.py' file, which looks like this (lifted verbatim from the distutils docs--the setuptools usage is almost identical): from distutils.core import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='[email protected]', url='http://www.python.org/sigs/distutils-sig/', packages=['distutils', 'distutils.command'], ) Normally, to build just the .spec file for an RPM of this module, I could run python setup.py bdist_rpm --spec-only, which parses the command line and calls the 'bdist_rpm' code to handle the RPM-specific stuff. The .spec file ends up in './dist'. How can I change my setup() invocation so that it runs the 'bdist_rpm' command with the '--spec-only' option, WITHOUT parsing command-line parameters? Can I pass the command name and options as parameters to setup()? Or can I manually construct a command line, and pass that as a parameter, instead? NOTE: I already know that I could call the script in a separate process, with an actual command line, using os.system() or the subprocess module or something similar. I'm trying to avoid using any kind of external command invocations. I'm looking specifically for a solution that runs setup() in the current interpreter. For background, I'm converting some release-management shell scripts into a single Python program. One of the tasks is running 'setup.py' to generate a .spec file for further pre-release testing. Running 'setup.py' as an external command, with its own command line options, seems like an awkward method, and it complicates the rest of the program. I feel like there may be a more Pythonic way.

    Read the article

  • Entity Framework Duplicate type name within an assembly (6.1.0)

    - by CodeMilian
    I am not sure what is going on but I keep getting the following exception when doing a query. "Duplicate type name within an assembly." I have not been able to find a solution on the web. I had resolved the issue by removing entity framework from all the projects in the solutions and re-installing using nugget. Then all of the sudden the exception is back. I have verified my table schema over and over and find nothing wrong with. This is the query causing the exception. var BaseQuery = from Users in db.Users join UserInstalls in db.UserTenantInstalls on Users.ID equals UserInstalls.UserID join Installs in db.TenantInstalls on UserInstalls.TenantInstallID equals Installs.ID where Users.Username == Username && Users.Password == Password && Installs.Name == Install select Users; var Query = BaseQuery.Include("UserTenantInstalls.TenantInstall"); return Query.FirstOrDefault(); As I mentioned previously the same query was working before. The data has not changed and the code has not changed.

    Read the article

  • How to query AD to get name email from lan id

    - by Kumar
    I have some code in asp.net ( kindly given by someone else ) to query AD to get user name and email etc. using System.DirectoryServices; using System.DirectoryServices.ActiveDirectory; using ActiveDs; DirectorySearcher search = new DirectorySearcher(new DirectoryEntry(), string.Format("(samaccountname={0})", id)); if (search == null) return id; if (search.FindOne() == null) return id; DirectoryEntry usr = search.FindOne().GetDirectoryEntry(); IADsUser oUsr = (IADsUser)usr.NativeObject; return string.Format("{0} {1}", usr.Properties["givenname"].Value, usr.Properties["sn"].Value); However this requires impersonation with an id that's required to be changed every 2 weeks and then updated in the web.config which is often forgotten Is there any non impersonation code to achieve the same result ? UPDATE - it's a config tool and it looks up name, email id etc. I like the service a/c idea Q - How is it possible to run ( impersonate ) just the AD code with a "service" a/c ? any samples/code ? how do you impersona

    Read the article

  • How to structure applications as multiple projects an name the packages in Java

    - by lostiniceland
    Hello Everyone I would like to know how you set up your projects in Java For example, in my current work-project, a six year old J2EE app with approximately 2 million LoC, we only have one project in Eclipse. The package structure is split into tiers and then domains, so it follows guidelines from Sun/Oracle. A huge ant-script is building different jars out of this one source-folder Personally I think it would be better to have multiple projects, at least for each tier. Recently I was playing around with a projects-structure like this: Domainproject (contains only annotated pojos, needed by all other projects) Datalayer (only persistence) Businesslogic (services) Presenter View This way, it should be easier to exchange components and when using a build tool like Maven I can have everything in a repository so when only working on the frontend I can get the rest as a dependecy in my classpath. Does this makes sense to you? Do you use different approaches and how do they look like? Furthermore I am struggeling how to name my packages/projects correctly. Right now, the above project-structure reflects in the names of the packages, eg. de.myapp.view and it continues with some technical subfolders like internal or interfaces. What I am missing here, and I dont know how to do this properly, is the distinction to a certain domain. When the project gets bigger it would be nice to recognise a particular domain but also the technical details to navigate more easily within the project. This leads to my second question: how do you name your projects and packages?

    Read the article

  • How to define multiple elements in XML Schema with the same name and different attribute value allow

    - by David Skyba
    I would like to create XML Schema for this chunk of xml, I would like to restrict the values of "name" attribute, so that in output document on and only one instance of day is allowed for each week day: <a> <day name="monday" /> <day name="tuesday" /> <day name="wednesday" /> </a> I have tried to use this: <xs:complexType name="a"> <xs:sequence> <xs:element name="day" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="name" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="monday" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="day" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="name" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="tuesday" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> but XML Schema validator in eclipse says error "Multiple elements with name 'day', with different types, appear in the model group.". Is there any other way?

    Read the article

  • ObjC get property name

    - by Joe Even
    Yes. I've searched a lot without success. I've looking for a way to get a property name as StringValue from inside a method. Lets say: My class has X Subviews from the Type UILabel. @property (strong, nonatomic) UILabel *firstLabel; @property (strong, nonatomic) UILabel *secondLabel; [...] and so on. Inside the method foo, the views are iterated as followed: -(void) foo { for (UIView *view in self.subviews) { if( [view isKindOfClass:[UILabel class]] ) { /* codeblock that gets the property name. */ } } } The Result should be something like that: THE propertyName(NSString) OF view(UILabel) IS "firstLabel" I've tried class_getInstanceVariable, object_getIvar and property_getName without Success. For Example, the Code for: [...] property_getName((void*)&view) [...] RETURNS: <UILabel: 0x6b768c0; frame = (65 375; 219 21); text = 'Something'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x6b76930>> But i'm looking for this kind of result: "firstLabel" , "secondLabel" and so on. Thanks for your help! Reagrds Joé

    Read the article

  • JoinColumn name not used in sql

    - by Vladimir
    Hi! I have a problem with mapping many-to-one relationship without exact foreign key constraint set in database. I use OpenJPA implementation with MySql database, but the problem is with generated sql scripts for insert and select statements. I have LegalEntity table which contains RootId column (among others). I also have Address table which has LegalEntityId column which is not nullable, and which should contain values referencing LegalEntity's "RootId" column, but without any database constraint (foreign key) set. Address entity is mapped: @Entity @Table(name="address") public class Address implements Serializable { ... @ManyToOne(fetch=FetchType.LAZY, optional=false) @JoinColumn(referencedColumnName="RootId", name="LegalEntityId", nullable=false, insertable=true, updatable=true, table="LegalEntity") public LegalEntity getLegalEntity() { return this.legalEntity; } } SELECT statement (when fetching LegalEntity's addresses) and INSERT statment are generated: SELECT t0.Id, .., t0.LEGALENTITY_ID FROM address t0 WHERE t0.LEGALENTITY_ID = ? ORDER BY t0.Id DESC [params=(int) 2] INSERT INTO address (..., LEGALENTITY_ID) VALUES (..., ?) [params=..., (int) 2] If I omit table attribute from mentioned statements are generated: SELECT t0.Id, ... FROM address t0 INNER JOIN legalentity t1 ON t0.LegalEntityId = t1.RootId WHERE t1.Id = ? ORDER BY t0.Id DESC [params=(int) 2] INSERT INTO address (...) VALUES (...) [params=...] So, LegalEntityId is not included in any of the statements. Is it possible to have relationship based on such referencing (to column other than primary key, without foreign key in database)? Is there something else missing? Thanks in advance.

    Read the article

  • PHP form processing - how to capture text from field that has variable Name/ID

    - by user80151
    I have a form that has a field pulled from the database as a dropdown. I need to get the text selected in the dropdown but I don't know in advance what the field ID will be. This is basically just a form that has already been generated. I don't need to pull anything from the database, it's already on this page. All I need to do is get the form information and email it, no writing to the database. I know how to do the _Request for the other fields based on the ID but I'm not sure how to do this one. The ID changes. It can be ID=1, ID-2, etc. I need to do something like: _REQUEST form element where ID is LIKE "ID[*]" or something similar. Any suggestions or links to tutorials? Here are a couple samples of what the dropdown renders on the page: <div class="wrapperAttribsOptions"> <h4 class="optionName back"><label class="attribsSelect" for="attrib- 1">Model</label></h4> <div class="back"> <select name="id[1]" id="attrib-1"> <option value="45">VC3-4C</option> <option value="1">VC3-4PG</option> <option value="3">VC3-4SG</option> <div class="wrapperAttribsOptions"> <h4 class="optionName back"><label class="attribsSelect" for="attrib-14">SPK Model</label></h4> <div class="back"> <select name="id[14]" id="attrib-14"> <option value="43">SPK-4</option> <option value="44">SPK-8</option> </select> TIA

    Read the article

  • Filemaker XSL Select Column By Name

    - by Kevin Sylvestre
    I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <people> <xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW"> <person> <name> <xsl:value-of select="fm:COL[01]/fm:DATA"/> </name> <location> <xsl:value-of select="fm:COL[02]/fm:DATA"/> </location> </person> </xsl:for-each> </people> </xsl:template> </xsl:stylesheet> Any ideas? Thanks.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >