Search Results

Search found 918 results on 37 pages for 'matthew marcus'.

Page 12/37 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Solaris 10: Identify a PID and the CPU it's running on

    - by Marcus
    I have multiple instances of a database running on a Solaris system. I'd like to prove that each database process is being handled by a different CPU. Essentially, I want to be able to do something like a ps -ef | grep <process_name> to get the PIDs and then run another command (if required) to identify the CPU... Is prstat able to do this? I'm making an assumption that as each database instance is started each one uses a different CPU. I'm not sure if I'm understanding this correctly... The reason I want to do this is because Sun hardware has slow CPU's, but lots of them. Therefore, to get the best performance out of it, I need to try and spread the load among CPU's... Thanks

    Read the article

  • How to eliminate NULL fields in TSQL

    - by salvationishere
    I am developing a TSQL query in SSMS 2008 R2. I am trying to develop this query to identify one record / client. Because some of these values are NULL, I am currently doing LEFT JOINS on most of the tables. But the problem with the LEFT JOINs is that now I get 1 record for some clients. But if I change this to INNER JOINs then some clients are excluded entirely because they have NULL values for these columns. How do I limit the query result to just one record / client regardless of NULL values? And if there are non-NULL values then I want it to choose the record with non-NULL values. Here is some of my current output: group_profile_id profile_name license_number is_accepting is_accepting_placement managing_office region vendor_name vendor_id applicant_type Office Address status_description Cert Date2 race ethnicity_desc religion 9CD932F1-6BE1-4F80-AB81-0CE32C565BCF Atreides Foster Home 1 Atreides1 1 Yes Manchester, NH Gulf Atlantic Atreides1 00000007 Treatment Foster Home 4042 Arrakis Avenue, Springfield, VT 05156 Open/Re-opened 2011-06-01 00:00:00.000 NULL NULL NULL DCE354D5-A7CC-409F-B5A3-89BF664B7718 Averitte, Leon and Sandra 00000044 1 Yes Birmingham, AL Gulf Atlantic AL Averitte, Leon and Sandra 00000044 Treatment Foster Home 3816 5th Avenue, Bessemer, AL 35020, (205)482-4307 Open/Re-opened 2011-08-05 00:00:00.000 NULL NULL NULL DCE354D5-A7CC-409F-B5A3-89BF664B7718 Averitte, Leon and Sandra 00000044 1 Yes Birmingham, AL Gulf Atlantic AL Averitte, Leon and Sandra 00000044 Treatment Foster Home 3816 5th Avenue, Bessemer, AL 35020, (205)482-4307 Open/Re-opened 2011-08-05 00:00:00.000 Caucasian/White Non Hispanic NULL AD02A43C-6F38-4F35-8C9E-E12422690BFB Bass, Matthew and Sarah 00000076 1 Yes Jacks on, MS Central Gulf Coast MS Bass, Matthew and Sarah 00000076 Treatment Foster Home 506 Eagelwood Drive, Florence, MS 39073, (601)665-7169 Open/Re-opened 2011-04-01 00:00:00.000 NULL NULL NULL AD02A43C-6F38-4F35-8C9E-E12422690BFB Bass, Matthew and Sarah 00000076 1 Yes Jackson, MS Central Gulf Coast MS Bass, Matthew and Sarah 00000076 Treatment Foster Home 506 Eagelwood Drive, Florence, MS 39073, (601)665-7169 Open/Re-opened 2011-04-01 00:00:00.000 Caucasian/White NULL Baptist You can see that both Averitte and Bass profile names have one record with NULL race, ethnicity, religion. How do I eliminate these rows (rows 2 and 4)? Here is my query currently: select distinct gp.group_profile_id, gp.profile_name, gp.license_number, gp.is_accepting, case when gp.is_accepting = 1 then 'Yes' when gp.is_accepting = 0 then 'No ' end as is_accepting_placement, mo.profile_name as managing_office, regions.[region_description] as region, pv.vendor_name, pv.id as vendor_id, at.description as applicant_type, dbo.GetGroupAddress(gp.group_profile_id, null, 0) as [Office Address], gsv.status_description, ri.[description] as race, ethnicity.description as ethnicity_desc, religion.description as religion from group_profile gp With (NoLock) --Office Information inner join group_profile_type gpt With (NoLock) on gp.group_profile_type_id = gpt.group_profile_type_id and gpt.type_code = 'FOSTERHOME' and gp.agency_id = @agency_id and gp.is_deleted = 0 inner join group_profile mo With (NoLock) on gp.managing_office_id = mo.group_profile_id left outer join payor_vendor pv With (NoLock) on gp.payor_vendor_id = pv.payor_vendor_id left outer join applicant_type at With (NoLock) on gp.applicant_type_id = at.applicant_type_id and at.is_foster_home = 1 inner join group_status_view gsv With (NoLock) on gp.group_profile_id = gsv.group_profile_id and gsv.status_value = 'OPEN' and gsv.effective_date = (Select max(b.effective_date) from group_status_view b With (NoLock) where gp.group_profile_id = b.group_profile_id) left outer join regions With (NoLock) on isnull(mo.regions_id, gp.regions_id) = regions.regions_id left join enrollment en on en.group_profile_id = gp.group_profile_id join event_log el on el.event_log_id = en.event_log_id left join people client on client.people_id = el.people_id left join race With (NoLock) on el.people_id = race.people_id left join group_profile_race gpr with (nolock) on gpr.race_info_id = race.race_info_id left join race_info ri with (nolock) on ri.race_info_id = gpr.race_info_id left join ethnicity With(NoLock) On client.ethnicity = ethnicity.ethnicity_id left join religion on client.religion = religion.religion_id

    Read the article

  • Can't Mount Phone, "according to mtab, /dev/sdb1 is already mounted on /"

    - by RPG Master
    My myTouch Slide wasn't mounting, so I decided to open Disk Utility. My phone shows up but when I click "Mount" it gives me this error: Error mounting: mount exited with exit code 1: helper failed with: mount: according to mtab, /dev/sdb1 is already mounted on / mount failed Here's my mtab: /dev/sdb1 / ext4 rw,errors=remount-ro,commit=0 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 none /sys sysfs rw,noexec,nosuid,nodev 0 0 fusectl /sys/fs/fuse/connections fusectl rw 0 0 none /sys/kernel/debug debugfs rw 0 0 none /sys/kernel/security securityfs rw 0 0 none /dev devtmpfs rw,mode=0755 0 0 none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0 none /dev/shm tmpfs rw,nosuid,nodev 0 0 none /var/run tmpfs rw,nosuid,mode=0755 0 0 none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0 gvfs-fuse-daemon /home/matthew/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=matthew 0 0 /dev/sdg1 /media/Seagate\040GoFlex ext4 rw,nosuid,nodev,uhelper=udisks 0 0 EDIT: Here's my fstab: # /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /dev/sda1 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=3b0db205-2bdb-4c98-a506-6bdd3520d540 none swap sw 0 0

    Read the article

  • Complex sound handling (I.E. pitch change while looping)

    - by Matthew
    Hi everyone I've been meaning to learn Java for a while now (I usually keep myself in languages like C and Lua) but buying an android phone seems like an excellent time to start. now after going through the lovely set of tutorials and a while spent buried in source code I'm beginning to get the feel for it so what's my next step? well to dive in with a fully featured application with graphics, sound, sensor use, touch response and a full menu. hmm now there's a slight conundrum since i can continue to use cryptic references to my project or risk telling you what the application is but at the same time its going to make me look like a raving sci-fi nerd so bare with me for the brief... A semi-working sonic screwdriver (oh yes!) my grand idea was to make an animated screwdriver where sliding the controls up and down modulate the frequency and that frequency dictates the sensor data it returns. now I have a semi-working sound system but its pretty poor for what its designed to represent and I just wouldn't be happy producing a sub-par end product whether its my first or not. the problem : sound must begin looping when the user presses down on the control the sound must stop when the user releases the control when moving the control up or down the sound effect must change pitch accordingly if the user doesn't remove there finger before backing out of the application it must plate the casing of there device with gold (Easter egg ;P) now I'm aware of how monolithic the first 3 look and that's why I would really appreciate any help I can get. sorry for how bad this code looks but my general plan is to create the functional components then refine the code later, no good painting the walls if the roofs not finished. here's my user input, he set slide stuff is used in the graphics for the control @Override public boolean onTouchEvent(MotionEvent event) { //motion event for the screwdriver view if(event.getAction() == MotionEvent.ACTION_DOWN) { //make sure the users at least trying to touch the slider if (event.getY() > SonicSlideYTop && event.getY() < SonicSlideYBottom) { //power setup, im using 1.5 to help out the rate on soundpool since it likes 0.5 to 1.5 SonicPower = 1.5f - ((event.getY() - SonicSlideYTop) / SonicSlideLength); //just goes into a method which sets a private variable in my sound pool class thing mSonicAudio.setPower(1, SonicPower); //this handles the slides graphics setSlideY ( (int) event.getY() ); @Override public boolean onTouchEvent(MotionEvent event) { //motion event for the screwdriver view if(event.getAction() == MotionEvent.ACTION_DOWN) { //make sure the users at least trying to touch the slider if (event.getY() > SonicSlideYTop && event.getY() < SonicSlideYBottom) { //power setup, im using 1.5 to help out the rate on soundpool since it likes 0.5 to 1.5 SonicPower = 1.5f - ((event.getY() - SonicSlideYTop) / SonicSlideLength); //just goes into a method which sets a private variable in my sound pool class thing mSonicAudio.setPower(1, SonicPower); //this handles the slides graphics setSlideY ( (int) event.getY() ); //this is from my latest attempt at loop pitch change, look for this in my soundPool class mSonicAudio.startLoopedSound(); } } if(event.getAction() == MotionEvent.ACTION_MOVE) { if (event.getY() > SonicSlideYTop && event.getY() < SonicSlideYBottom) { SonicPower = 1.5f - ((event.getY() - SonicSlideYTop) / SonicSlideLength); mSonicAudio.setPower(1, SonicPower); setSlideY ( (int) event.getY() ); } } if(event.getAction() == MotionEvent.ACTION_UP) { mSonicAudio.stopLoopedSound(); SonicPower = 1.5f - ((event.getY() - SonicSlideYTop) / SonicSlideLength); mSonicAudio.setPower(1, SonicPower); } return true; } and here's where those methods end up in my sound pool class its horribly messy but that's because I've been trying a ton of variants to get this to work, you will also notice that I begin to hard code the index, again I was trying to get the methods to work before making them work well. package com.mattster.sonicscrewdriver; import java.util.HashMap; import android.content.Context; import android.media.AudioManager; import android.media.SoundPool; public class SoundManager { private float mPowerLvl = 1f; private SoundPool mSoundPool; private HashMap mSoundPoolMap; private AudioManager mAudioManager; private Context mContext; private int streamVolume; private int LoopState; private long mLastTime; public SoundManager() { } public void initSounds(Context theContext) { mContext = theContext; mSoundPool = new SoundPool(2, AudioManager.STREAM_MUSIC, 0); mSoundPoolMap = new HashMap<Integer, Integer>(); mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); } public void addSound(int index,int SoundID) { mSoundPoolMap.put(1, mSoundPool.load(mContext, SoundID, 1)); } public void playUpdate(int index) { if( LoopState == 1) { long now = System.currentTimeMillis(); if (now > mLastTime) { mSoundPool.play(mSoundPoolMap.get(1), streamVolume, streamVolume, 1, 0, mPowerLvl); mLastTime = System.currentTimeMillis() + 250; } } } public void stopLoopedSound() { LoopState = 0; mSoundPool.setVolume(mSoundPoolMap.get(1), 0, 0); mSoundPool.stop(mSoundPoolMap.get(1)); } public void startLoopedSound() { LoopState = 1; } public void setPower(int index, float mPower) { mPowerLvl = mPower; mSoundPool.setRate(mSoundPoolMap.get(1), mPowerLvl); } } ah ha! I almost forgot, that looks pretty ineffective but I omitted my thread which actuality updates it, nothing fancy it just calls : mSonicAudio.playUpdate(1); thanks in advance, Matthew

    Read the article

  • Not getting gigbit from a gigabit link?

    - by marcusw
    I just upgraded my LAN to gigabit. This is what netperf has to say about things. Before: marcus@lt:~$ netperf -H 192.168.1.1 TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.1 (192.168.1.1) port 0 AF_INET : demo Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 87380 16384 16384 10.02 94.13 After: marcus@lt:~$ netperf -H 192.168.1.1 TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.1 (192.168.1.1) port 0 AF_INET : demo Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 87380 16384 16384 10.01 339.15 Only 340 Mbps? What's up with that? Background info: I'm connecting through a gigabit switch to a sheevaplug. I have Cat5e wiring in the walls and the run is maybe 30 feet. If you're not familiar with netperf, it has a tendency to give very stable results and never lie.

    Read the article

  • How to truncate a table with Spring JdbcTemplate?

    - by Marcus
    I'm trying to truncate a table with Spring: jdbcTemplate.execute("TRUNCATE TABLE " + table); Get the error: Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [TRUNCATE TABLE RESULT_ACCOUNT]; nested exception is java.sql.SQLException: Unexpected token: TRUNCATE in statement [TRUNCATE] Any ideas?

    Read the article

  • Python 2.4 inline if statements

    - by Marcus Whybrow
    I am setting up an existing django project on a dreamhost web server, so far I have got everything to work correctly. However I developed under python 2.5 and dreamhost by default uses python 2.4. The following line seems gives a syntax error because of the if keyword: 'parent': c.parent.pk if c.parent is not None else None ^ Is it the case that this form of if statement was introduced in Python 2.5, if so is there an easy change that would make it compatible with Python 2.4? Or, should I just change to Python 2.5. I have already installed python 2.5 to a directory under my home directory, and have succeeded in running the python interpreter under 2.5. If I wish to use Python 2.5 for everything, where can I set this?

    Read the article

  • Understanding MQ Series bindings files

    - by Marcus
    Our Java app writes to MQ Series queues via a Weblogic JMS Message Bridge. The actual MQ Series connection/queue details are stored in the MQ Series .bindings file on the app server. I've never really got my head around the bindings file and what all the entries mean. Can anyone provide guidance to understand this file?

    Read the article

  • WCF Service Authentication problem?

    - by Marcus
    I have an application which exposes lots of interfaces via net.tcp protocol, using both SecurityMode.Transport and SecurityMode.None (I really need support for both). My whole application is written in a DLL file. I have a form which consumes this DLL and now I made a Windows Service to consume this DLL. The problem is, when this windows service goes up, the insecure service throws this exception: Stream Security is required at http://www.w3.org/2005/08/addressing/anonymous, but no security context was negotiated. This is likely caused by the remote endpoint missing a StreamSecurityBindingElement from its binding. In the client side, nothing has changed. Is there any reason for this behaviour? The program is exactly the same. When I run the same test with the form app, it works... ps: I've already tried running the windows service as: SYSTEM, NETWORK SERVICE and my user account (which runs the form app) Thanks

    Read the article

  • ToolStrip memory leak

    - by Marcus
    Hi, I've been having trouble with memory leaks with the SWF-ToolStrip. According to this http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=115600# is has been resolved. But here it seemes not. Anyone know how to resolve this?

    Read the article

  • Using truncate table alongside Hibernate?

    - by Marcus
    Is it OK to truncate tables while at the same time using Hibernate to insert data? We parse a big XML file with many relationships into Hibernate POJO's and persist to the DB. We are now planning on purging existing data at certain points in time by truncating the tables. Is this OK? It seems to work fine. We don't use Hibernate's second level cache. One thing I did notice, which is fine, is that when inserting we generate primary keys using Hibernate's @GeneratedValue where Hibernate just uses a key value one greater than the highest value in the table - and even though we are truncating the tables, Hibernate remembers the prior value and uses prior value + 1 as opposed to starting over at 1. This is fine, just unexpected. Note that the reason we do truncate as opposed to calling delete() on the Hibernate POJO's is for speed. We have gazillions of rows of data, and truncate is just so much faster.

    Read the article

  • Proving f (f bool) = bool

    - by Marcus Whybrow
    How can I in coq, prove that a function f that accepts a bool true|false and returns a bool true|false (shown below), when applied twice to a single bool true|false would always return that same value true|false: (f:bool -> bool) For example the function f can only do 4 things, lets call the input of the function b: Always return true Always return false Return b (i.e. returns true if b is true vice versa) Return not b (i.e. returns false if b is true and vice vera) So if the function always returns true: f (f bool) = f true = true and if the function always return false we would get: f (f bool) = f false = false For the other cases lets assum the function returns not b f (f true) = f false = true f (f false) = f true = false In both possible input cases, we we always end up with with the original input. The same holds if we assume the function returns b. So how would you prove this in coq? Goal forall (f:bool -> bool) (b:bool), f (f b) = f b.

    Read the article

  • WebDAV auto-versioning in Git or Hg or any modern VCS

    - by Marcus P S
    I just recently learned of SVN's auto-versioning feature for WebDAV. Although I understand this is not replacement for proper versioning, with messages documenting change sets, it strikes me as a solid and safe replacement to Dropbox (minus nice GUIs and web pages). However, since commits in auto-versioning are frequent, I'd imagine that Git or Hg would be better suited for this, just because of their more compact databases (although I wonder if the distributed nature of things could make the automation ugly for resolving conflicts). Is this a feature that has been implemented using Git or Hg, as far as anyone knows?

    Read the article

  • Hibernate MappingException

    - by Marcus
    I'm getting this Hibernate error: org.hibernate.MappingException: Could not determine type for: a.b.c.Results$BusinessDate, for columns: [org.hibernate.mapping.Column(businessDate)] The class is below. Does anyone know why I'm getting this error?? @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "businessDate" }) @XmlRootElement(name = "Results") @Entity(name = "Results") @Table(name = "RESULT") @Inheritance(strategy = InheritanceType.JOINED) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class Results implements Equals, HashCode { @XmlElement(name = "BusinessDate", required = true) protected Results.BusinessDate businessDate; public Results.BusinessDate getBusinessDate() { return businessDate; } public void setBusinessDate(Results.BusinessDate value) { this.businessDate = value; } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "raw", "display" }) @Entity(name = "Results$BusinessDate") @Table(name = "BUSINESSDATE") @Inheritance(strategy = InheritanceType.JOINED) public static class BusinessDate implements Equals, HashCode { ....

    Read the article

  • Storable Geocoding/reverse Geocoding services

    - by Marcus
    Im currently looking into an easy way to query and store Latitude/Longitude for a given address. There are a plentitude of services out there, but none actually allows me to store the data I retieve (i.e. Google Maps API TOS, Yahoo! Maps API TOS). As I wan't to use them for a distance search I can't really query the data on the fly. Are there any services that acutally allow to store the location you get for an adress? And I want to do it more or less worldwide. (As a side question, I might need the other way around soon, getting from latitude/longitude to an address or place name, but this falls under the same terms as the above).

    Read the article

  • Java enums vs constants for Strings

    - by Marcus
    I've switched from using constants for Strings: public static final String OPTION_1 = "OPTION_1"; ... to enums: public enum Options { OPTION_1; } With constants, you'd just refer to the constant: String s = TheClass.OPTION_1 But with Enums, you have to specify toString(): String s = Options.OPTION_1.toString(); I don't like that you have to use the toString() statement, and also, in some cases you can forget to include it which can lead to unintended results.. ie: Object o = map.get(Options.OPTION_1); //This won't work as intended if the Map key is a String Is there a better way to use enums for String constants?

    Read the article

  • SQL - Count grouped entries and then get the max values grouped by date

    - by Marcus
    hello, I am out of any logic how to write the right sql statment. I've got a sqlite table holding every played track in a row with played date/time Now I will count the plays of all artists, grouped by day and then find the artist with the max playcount per day. I used this Query SELECT COUNT(ARTISTID) AS artistcount, ARTIST AS artistname,strftime('%Y-%m-%d', playtime) AS day_played FROM playcount GROUP BY artistname to get this result "93"|"The Skygreen Leopards"|"2010-06-16" "2" |"Arcade Fire" |"2010-06-15" "2" |"Dead Kennedys" |"2010-06-15" "2" |"Wolf People" |"2010-06-15" "3" |"16 Horsepower" |"2010-06-15" "3" |"Alela Diane" |"2010-06-15" "46"|"Motorama" |"2010-06-15" "1" |"Ariel Pink's Haunted" |"2010-06-14" I tried then to query this virtual table but I always get false results in artistname. SELECT MAX(artistcount), artistname , day_played FROM ( SELECT COUNT(ARTISTID) AS artistcount, ARTIST AS artistname,strftime('%Y-%m-%d', playtime) AS day_played FROM playcount GROUP BY artistname ) GROUP BY strftime('%Y-%m-%d',day_played) result in this "93"|"lilium" |"2010-06-16" "46"|"Wolf People"|"2010-06-15" "30"|"of Montreal"|"2010-06-14" but the artist name is false. I think through the grouping by day, it just use the last artist, or so. I tested stuff like INNER JOIN or GROUP BY ... HAVING in trial and error, I read examples of similar issues but always get lost in columnnames and stuff (I am a bit burned out) I hope someone can give me a hint. thanks m

    Read the article

  • ASP.NET Ajax - Asynch request has separate session???

    - by Marcus King
    We are writing a search application that saves the search criteria to session state and executes the search inside of an asp.net updatepanel. Sometimes when we execute multiple searches successively the 2nd or 3rd search will sometimes return results from the first set of search criteria. Example: our first search we do a look up on "John Smith" - John Smith results are displayed. The second search we do a look up on "Bob Jones" - John Smith results are displayed. We save all of the search criteria in session state as I said, and read it from session state inside of the ajax request to format the DB query. When we put break points in VS everything behaves as normal, but without them we get the original search criteria and results. My guess is because they are saved in session, that the ajax request somehow gets its own session and saves the criteria to that, and then retrieves the criteria from that session every time, but the non-async stuff is able to see when the criteria is modified and saves the changes to state accordingly, but because they are from two different sessions there is a disparity in what is saved and read. EDIT::: To elaborate more, there was a suggestion of appending the search criteria to the query string which normally is good practice and I agree thats how it should be but following our requirements I don't see it as being viable. They want it so the user fills out the input controls hits search and there is no page reload, the only thing they see is a progress indicator on the page, and they still have the ability to navigate and use other features on the current page. If I were to add criteria to the query string I would have to do another request causing the whole page to load, which depending on the search criteria can take a really long time. This is why we are using an ajax call to perform the search and why we aren't causing another full page request..... I hope this clarifies the situation.

    Read the article

  • Java type for date/time when using Oracle Date with Hibernate

    - by Marcus
    We have a Oracle Date column. At first in our Java/Hibernate class we were using java.sql.Date. This worked but it didn't seem to store any time information in the database when we save so I changed the Java data type to Timestamp. Now we get this error: springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.an notation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [margin-service-domain -config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreatio nException: Error creating bean with name 'sessionFactory' defined in class path resource [m-service-doma in-config.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Wrong column type: CREATE_TS, expected: timestamp Any ideas on how to map an Oracle Date while retaining the time portion? Update: I can get it to work if I use the Oracle Timestamp data type but I don't want that level of precision ideally. Just want the basic Oracle Date.

    Read the article

  • How to Select Items in Dropdown in Selenium

    - by Marcus Gladir
    Firstly, I have been trying to get the dropdown from this web page: http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl This is the code I have: import urllib2 from bs4 import BeautifulSoup import re from pprint import pprint import sys from selenium import common from selenium import webdriver import selenium.webdriver.support.ui as ui from boto.s3.key import Key import requests url = 'http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl' element_xpath = '//*[@id="Component1"]' driver = webdriver.PhantomJS() driver.get(url) element = driver.find_element_by_xpath(element_xpath) element_xpath = '/option[@value="02"]' all_options = element.find_elements_by_tag_name("option") for option in all_options: print("Value is: %s" % option.get_attribute("value")) option.click() source = driver.page_source.encode('utf-8', 'ignore') driver.quit() source = str(source) soup = BeautifulSoup(source, 'html.parser') print soup What prints out is this: Traceback (most recent call last): File "../../../../test.py", line 58, in <module> Value is: XX main() File "../../../../test.py", line 46, in main option.click() File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 54, in click self._execute(Command.CLICK_ELEMENT) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 228, in _execute return self._parent.execute(command, params) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 165, in execute self.error_handler.check_response(response) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 158, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotVisibleException: Message: u'{"errorMessage":"Element is not currently visible and may not be manipulated","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:51413","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{\\"sessionId\\": \\"30e4fd50-f0e4-11e3-8685-6983e831d856\\", \\"id\\": \\":wdc:1402434863875\\"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/30e4fd50-f0e4-11e3-8685-6983e831d856/element/%3Awdc%3A1402434863875/click"}}' ; Screenshot: available via screen And the weirdest most infuriating bit of it all is that sometimes it actually all works out. I have no clue what's going on here.

    Read the article

  • Working with expression AST:s

    - by Marcus
    Hi, Is there any best practice when working with AST:s? I have a parsed expression AST. ConstantExpression, BinaryExpression etc. I want to populate a GUI-dialog with information from the AST, and it's here where I get kinda confused because my code gets pretty messy. Example: expression = "Var1 > 10 AND Var2 < 20" I want to populate two textboxes with value 10 resp. 20 from the AST. What I'm doing now is a recursive method that checks for correct child expression-types (with .Net Is-operator) and acts accordingly and the code is really "smelly" :) Is there any design pattern, like Visitor or such, that makes this somewhat easier/more readable/maintainable ?

    Read the article

  • TreeView in Winforms and focus problem

    - by Marcus
    Hi, Can anyone please explain to my why the form in the code below gets out of focus when selecting a treenode in the tree? What should happen is that the form/button should get the focus when the tree disappears like the listview example but it doesn't. Code example: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace FocusTest { public partial class Form1 : Form { #region Generated /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Item1"); System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Item2"); System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Item3"); System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Node0"); System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Node1"); System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Node2"); this.button1 = new System.Windows.Forms.Button(); this.listView1 = new System.Windows.Forms.ListView(); this.button2 = new System.Windows.Forms.Button(); this.treeView1 = new System.Windows.Forms.TreeView(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(12, 12); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // listView1 // this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] { listViewItem1, listViewItem2, listViewItem3 }); this.listView1.Location = new System.Drawing.Point(12, 41); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(121, 97); this.listView1.TabIndex = 1; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.Visible = false; this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); this.listView1.View = View.List; // // button2 // this.button2.Location = new System.Drawing.Point(310, 11); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 2; this.button2.Text = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // treeView1 // this.treeView1.Location = new System.Drawing.Point(310, 41); this.treeView1.Name = "treeView1"; treeNode1.Name = "Node0"; treeNode1.Text = "Node0"; treeNode2.Name = "Node1"; treeNode2.Text = "Node1"; treeNode3.Name = "Node2"; treeNode3.Text = "Node2"; this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3}); this.treeView1.Size = new System.Drawing.Size(121, 97); this.treeView1.TabIndex = 3; this.treeView1.Visible = false; this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(760, 409); this.Controls.Add(this.treeView1); this.Controls.Add(this.button2); this.Controls.Add(this.listView1); this.Controls.Add(this.button1); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.Button button2; private System.Windows.Forms.TreeView treeView1; #endregion public Form1() { InitializeComponent(); } #region TreeView private void button2_Click(object sender, EventArgs e) { ToggleTreeView(); } private void ToggleTreeView() { if (treeView1.Visible) { Controls.Remove(treeView1); treeView1.Visible = false; } else { Controls.Add(treeView1); treeView1.Size = new Size(300, 400); treeView1.Location = PointToClient(PointToScreen(new System.Drawing.Point(button2.Location.X, button2.Location.Y + button2.Height))); this.treeView1.BringToFront(); treeView1.Visible = true; treeView1.Select(); } } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { ToggleTreeView(); } #endregion #region ListView private void button1_Click(object sender, EventArgs e) { ToggleListView(); } private void ToggleListView() { if (listView1.Visible) { Controls.Remove(listView1); listView1.Visible = false; } else { Controls.Add(listView1); listView1.Size = new Size(300, 400); listView1.Location = PointToClient(PointToScreen(new System.Drawing.Point(button1.Location.X, button1.Location.Y + button1.Height))); this.listView1.BringToFront(); listView1.Visible = true; listView1.Select(); } } private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if (listView1.Visible) ToggleListView(); } #endregion } }

    Read the article

  • asp.net client/browser url

    - by Marcus King
    I'm wondering how I can get the url from the browser in asp.net. I have a page that I use globalization/localization for and I am redirecting (via server not code) from www.spanishversion.com to www.englishversion.com but the url is masked to still say www.spanishversion.com. I want to get what the browser's url is but when I try things like Request.Url.ToString() Request.Url.OriginalUrl Request.Path Request.RawUrl Request.ServerVariables["SERVER_NAME"] it always comes back as www.englishversion.com. Is there a way that I can explicitly read the url from the browser? Thanks.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >