Daily Archives

Articles indexed Monday March 7 2011

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

  • High end mobile workstations with pointer stick

    - by Elijah Lynn
    I am looking for a list of higher end mobile workstations that run Ubuntu/Kubuntu well and also have a hardware pointer stick. Here's an illustration of one (from sciencesurvivalblog): I wouldn't mind getting a Macbook Pro and wiping it but they refuse to use pointer sticks and to me, they are extremely efficient. I see a lot of potential for Lenovo thinkpads as well. System 76 said they have no plans to implement a hardware pointer stick so that leaves them out as well. Any ideas?

    Read the article

  • How do I mount shared folders (win7 host) in Ubuntu (guest) using VMware(tools v6)

    - by V-Light
    Hello, Experts. I've successfully installed VMware tools for Ubuntu. Everything seems to work fine, but shared folders were not mounted automatically. How do I get them to work? If I run vmware-hgfsclient in terminal, I get the list of shared folders, but ls -l /mnt/hgfs is empty. Actually there's no hgfs dir in /mnt. I know I should probably use the vmware-hgfsclient tool, but I realy don't know how. P.S. I wouldn't ask if I could understand the vmware-hgfsclient help I've read. Any suggestions?

    Read the article

  • Why is my Ubuntu 10.10 CD not booting?

    - by Tom Brito
    I have downloaded Ubuntu 10.10 and burned the ISO but it will not boot. I discarded problems with the ISO, as I've downloaded from the official website with no errors, and burned it with no errors. I discarded problems with the burning, as looks like it was recorded with no errors here and later in another computer. I discarded problems with my DVD reader as other cds boots fine. I'm currently using Ubuntu 9.10, I know I can upgrade via internet, but I have this same problem with my Windows XP cd, so I really would like to discover what's going on here.. My Ubuntu 9.10 cd boots just right, but the new one not. What else can be? Or what more precise tests can I make to discover where's the problem? --More info What happens when I try to boot with the Ubuntu 10.10 cd is that it behavior like there's no bootable cd in the drive. It just don't find the boot on the cd, and start the HD system. My notebook is an Amazon PC Intel Celeron 1.5 with 2Gb memory, a DVD-RW driver, HD samsung with 260GB.

    Read the article

  • Problems with NVIDIA drivers: White screen with full(or almost full)screen apps

    - by Felipe
    My NVIDIA graphic card is a 7050/610i. My problem is that after upgrading to the last NVIDIA drivers when I use fullscreen apps (or almost fullscreen) the windows goes white. My xorg.conf file: # nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 270.29 ([email protected]) Wed Feb 23 16:38:34 PST 2011 Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" HorizSync 28.0 - 33.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" Option "AddARGBGLXVisuals" "True" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection Section "Module" Load "glx" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" # generated from default EndSection Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Device" Identifier "Device0" VendorName "NVIDIA Corporation" Driver "nvidia" Option "NoLogo" "True" EndSection Any idea on how to solve this? <--Sorry for bad english, ask for more info--

    Read the article

  • SEO: Moving articles from one domain to another

    - by Melanie
    Currently I have articles up on a website (site A) that is not mine (but I can remove the articles.) The article's aren't faring well (not only due to the recent Google changes) but because they really could do better if I made some tweaks myself instead of relying on the domain owner's SEO skills. So I would like to set up my own website and have just my articles on it (site B.) In the past when I've moved content, I've set up redirects but this time I can't do that. What would be the best way to move the articles without having to worry about them being counted as duplicate content or any other lame stuff? Should I, A: Save the articles on my computer and remove them from Site A. Wait for Google to remove them from the index (several months.) B: Remove the articles from Site A and immediately place them on Site B.

    Read the article

  • Is flash game development not considered 'proper' game development?

    - by humbleBee
    I've come across this a couple of times. That flash game development is not 'proper' game development when compared to XNA or even Unity. Mentioned here: Need guidelines for studying Game Development Also here in some comments : Where to start with game development? This judgement also befalls java, according to some. Is it because in flash its so easy to draw graphics and to import and add on to the stage any element we want and also because flash needs a 'container program' to run and others don't? But flash is by far way easier to 'distribute' than any other of those mentioned above. Maybe except for iphone or android games.

    Read the article

  • rotate player based off of joystick

    - by pengume
    Hey everyone I have this game that i am making in android and I have a touch screen joystick that moves the player around based on the joysticks position. I cant figure out how to also get the player to rotate at the same angle of the joystick. so when the joystick is to the left the players bitmap is rotated to the left as well. Maybe someone here has some sample code I could look at here is the joysticks class that I am using. `public class GameControls implements OnTouchListener { public float initx = DroidzActivity.screenWidth - 45; //255; // 320 og 425 public float inity = DroidzActivity.screenHeight - 45;//425; // 480 og 267 public Point _touchingPoint = new Point( DroidzActivity.screenWidth - 45, DroidzActivity.screenHeight - 45); public Point _pointerPosition = new Point(DroidzActivity.screenWidth - 100, DroidzActivity.screenHeight - 100); // ogx 220 ogy 150 private Boolean _dragging = false; private boolean attackMode = false; @Override public boolean onTouch(View v, MotionEvent event) { update(event); return true; } private MotionEvent lastEvent; public boolean ControlDragged; private static double angle; public void update(MotionEvent event) { if (event == null && lastEvent == null) { return; } else if (event == null && lastEvent != null) { event = lastEvent; } else { lastEvent = event; } // drag drop if (event.getAction() == MotionEvent.ACTION_DOWN) { if ((int) event.getX() > 0 && (int) event.getX() < 50 && (int) event.getY() > DroidzActivity.screenHeight - 160 && (int) event.getY() < DroidzActivity.screenHeight - 0) { setAttackMode(true); } else { _dragging = true; } } else if (event.getAction() == MotionEvent.ACTION_UP) { if(isAttackMode()){ setAttackMode(false); } _dragging = false; } if (_dragging) { ControlDragged = true; // get the pos _touchingPoint.x = (int) event.getX(); _touchingPoint.y = (int) event.getY(); // Log.d("GameControls", "x = " + _touchingPoint.x + " y = " //+ _touchingPoint.y); // bound to a box if (_touchingPoint.x < DroidzActivity.screenWidth - 75) { // og 400 _touchingPoint.x = DroidzActivity.screenWidth - 75; } if (_touchingPoint.x > DroidzActivity.screenWidth - 15) {// og 450 _touchingPoint.x = DroidzActivity.screenWidth - 15; } if (_touchingPoint.y < DroidzActivity.screenHeight - 75) {// og 240 _touchingPoint.y = DroidzActivity.screenHeight - 75; } if (_touchingPoint.y > DroidzActivity.screenHeight - 15) {// og 290 _touchingPoint.y = DroidzActivity.screenHeight - 15; } // get the angle setAngle(Math.atan2(_touchingPoint.y - inity, _touchingPoint.x - initx) / (Math.PI / 180)); // Move the ninja in proportion to how far // the joystick is dragged from its center _pointerPosition.y += Math.sin(getAngle() * (Math.PI / 180)) * (_touchingPoint.x / 70); // og 180 70 _pointerPosition.x += Math.cos(getAngle() * (Math.PI / 180)) * (_touchingPoint.x / 70); // make the pointer go thru if (_pointerPosition.x > DroidzActivity.screenWidth) { _pointerPosition.x = 0; } if (_pointerPosition.x < 0) { _pointerPosition.x = DroidzActivity.screenWidth; } if (_pointerPosition.y > DroidzActivity.screenHeight) { _pointerPosition.y = 0; } if (_pointerPosition.y < 0) { _pointerPosition.y = DroidzActivity.screenHeight; } } else if (!_dragging) { ControlDragged = false; // Snap back to center when the joystick is released _touchingPoint.x = (int) initx; _touchingPoint.y = (int) inity; // shaft.alpha = 0; } } public void setAttackMode(boolean attackMode) { this.attackMode = attackMode; } public boolean isAttackMode() { return attackMode; } public void setAngle(double angle) { this.angle = angle; } public static double getAngle() { return angle; } }` I should also note that the player has animations based on when he is moving or attacking.

    Read the article

  • Games development with a game loop that's abstracted away

    - by Davy8
    Most game development happens with a main game loop. Are there any good articles/blog posts/discussions about games without a game loop? I imagine they'd mostly be web games, but I'd be interested in hearing otherwise. (As a side note, I think it's really interesting that the concept is almost exclusively used in gaming as far as I'm aware, perhaps that may be another question.) Edit: I realize there's probably a redraw loop somewhere. I guess what I really mean is a loop that is hidden to you. Frames are something you as the developer are not concerned with as you're working on a higher level of abstraction. E.g. someLootItem.moveTo(inventory, someAnimatationType) and that will move from the loot box to your inventory using the specified animation type without the game developer having to worry about the implementation details of that animation. Maybe that's how "real" games end up working, but from reading most tutorials they seem to imply a much more granular level of control is used, but that might just be an artifact of being a tutorial. Edit2: I think most people are misunderstanding what I'm trying to ask, likely because I'm having trouble describing exactly what I'm trying to ask. After some more thinking perhaps what I'm referring to is more along the lines of what I believe is referred to as "scripting" where you're working at a very high level and having some game engine take care of the low level details. For example, take custom maps in Starcraft II or Warcraft III. Many of the "maps" have gameplay that deviates enough from the primary game that they could be considered a separate game written on the same engine. What I'm referring to then is along those lines. I may be wrong because I only dabbed in the Warcraft III editor, but as far as I remember no where in the map editor do you control the game loop, and yet you can create many different games out of it. In my mind, these are games in their own right. If you're playing DotA you don't say you're playing Warcraft III, you say you're playing DotA because that's the actual game you're playing. Such a system may impose limitations that don't exist if you're creating a game from scratch, but it greatly reduces development time because much of the "hard" work has already been done for you. Hopefully that clarifies what I'm asking. Another example of what is I mean, is when you write a web app, of course it communicates through sockets and TCP. But does the average web developer doesn't explicitly write code for connecting sockets. They just need to know about receiving a request and sending a response. There are unique scenarios where you do occasionally need to use raw sockets, but it's generally rare in web development. In a similar fashion, it's very possible to write a game without directly using the game loop, even though one is used behind the scenes. Probably not a AAA title, but there must be hundreds of smaller scale games that can and possibly are written this way. Are there any good resources on writing these "simpler" games?

    Read the article

  • Nokogiri extract data from xml

    - by Awea
    Hi guys, i try to extract data from a xml in rails application with the Nokogiri gem, the xml : <item> <description> <img src="something" title="anothething"> <p>text, bla bla...</p> </description> </item> Actually i do something like this to extract data from the xml : def test_content @return = Array.new site = 'http://www.les-encens.com/modules/feeder/rss.php?id_category=0' @doc = Nokogiri::XML(open(site, "UserAgent" => "Ruby-OpenURI")) @doc.xpath("//item").each do |n| @return << [ n.xpath('description') ] end end Could you show me how extract just the src attribute from the img tag ?

    Read the article

  • Mixing C and C++, raw pointers and (boost) shared pointers

    - by oompahloompah
    I am working in C++ with some legacy C code. I have a data structure that (during initialisation), makes a copy of the structure pointed to a ptr passed to its initialisation pointer. Here is a simplification of what I am trying to do - hopefully, no important detail has been lost in the "simplification": /* C code */ typedef struct MyData { double * elems; unsigned int len; }; int NEW_mydata(MyData* data, unsigned int len) { // no error checking data->elems = (double *)calloc(len, sizeof(double)); return 0; } typedef struct Foo { MyData data data_; }; void InitFoo(Foo * foo, const MyData * the_data) { //alloc mem etc ... then assign the STRUCTURE foo.data_ = *thedata ; } C++ code ------------- typedef boost::shared_ptr<MyData> MyDataPtr; typedef std::map<std::string, MyDataPtr> Datamap; class FooWrapper { public: FooWrapper(const std::string& key) { MyDataPtr mdp = dmap[key]; InitFoo(&m_foo, const_cast<MyData*>((*mdp.get()))); } ~FooWrapper(); double get_element(unsigned int index ) const { return m_foo.elems[index]; } private: // non copyable, non-assignable FooWrapper(const FooWrapper&); FooWrapper& operator= (const FooWrapper&); Foo m_foo; }; int main(int argc, char *argv[]) { MyData data1, data2; Datamap dmap; NEW_mydata(&data1, 10); data1->elems[0] = static_cast<double>(22/7); NEW_mydata(&data2, 42); data2->elems[0] = static_cast<double>(13/21); boost::shared_ptr d1(&data1), d2(&data2); dmap["data1"] = d1; dmap["data2"] = d2; FooWrapper fw("data1"); //expect 22/7, get something else (random number?) double ret fw.get_element(0); } Essentially, what I want to know is this: Is there any reason why the data retrieved from the map is different from the one stored in the map?

    Read the article

  • Using Bundle and Intent with TabHost

    - by apesa
    I am using TabHost with 3 tabs. I need to pass the params selected from one screen using Bundle and / or Intent to the next and then set the correct tab in TabHost and pass those params to the correct tab. I hope that makes sense. I have a config screen that has several radio buttons that are grouped and 1 checkbox and a button. in my onClick() I have the following code. public class Distribute extends Activity implements OnClickListener { DistributionMap gixnav; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView textview = new TextView(this); textview.setText("Distribution"); setContentView(R.drawable.configup); Button button = (Button)findViewById(R.id.btn_configup1); button.setOnClickListener(this); } public void onClick(View v) { Intent intent; Bundle extras = new Bundle(); intent = new Intent().setClass(getApplicationContext(), Clevel.class); intent.putExtras(extras); startActivity(intent); } } I need to pass the selection params (which radio button is selected and is the checkbox clicked to Clevel. In Clevel I have to parse the bundle and operate on those params. Basiclaly I will be pulling data froma DB and using that data to call google maps ItemizedOverlay. onClick calls Clevel.class using Intent. This works and I understand how Intent works. What I need to understand is how to grab or reference the selected radio button and whatever else may be clicked or checked and pass it through TabHost to the correct Tab. This is what I have in Clevel for TabHost. From TabHost the onCLick will need to pass everything to Distribute.class public class Clevel extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gixout1); Resources res = getResources(); TabHost tabHost = getTabHost(); TabHost.TabSpec spec; Intent intent; String mData; Bundle extras = getIntent().getExtras(); if (extras != null) { mData = extras.getString("key"); } intent = new Intent().setClass(this, ClevelMain.class); spec = tabHost.newTabSpec("Main").setIndicator("C-Level", res.getDrawable(R.drawable.gixmain)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, Distribute.class); spec = tabHost.newTabSpec("Config").setIndicator("Distribute", res.getDrawable(R.drawable.gixconfig)) .setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, DistributionMap.class); spec = tabHost.newTabSpec("Nav").setIndicator("Map", res.getDrawable(R.drawable.gixnav)) .setContent(intent); tabHost.addTab(spec); tabHost.setCurrentTab(3); tabHost.getOnFocusChangeListener(); } I am really looking for some pointers on how to pass and use params in Bundle and whether in should use Bundle and Intent or can I just use Intent? Thanks in advance, Pat

    Read the article

  • Java KeyListener in separate class

    - by Chris
    So I have my main class here, where basically creates a new jframe and adds a world object to it. The world object is basically where all drawing and keylistening would take place... public class Blobs extends JFrame{ public Blobs() { super("Blobs :) - By Chris Tanaka"); setVisible(true); setResizable(false); setSize(1000, 1000); setIgnoreRepaint(true); setDefaultCloseOperation(EXIT_ON_CLOSE); add(new World()); } public static void main(String[] args) { new Blobs(); } } How exactly would you get key input from the world class? (So far I have my world class extending a jpanel and implementing a keylistener. In the constructor i addKeyListener(this). I also have these methods since they are auto implemented: public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_W) System.out.println("Hi"); } public void keyReleased(KeyEvent e) {} public void keyTyped(KeyEvent e) {} However this does not seem to work?

    Read the article

  • Using Apache Velocity with StringBuilders/CharSequences

    - by mindas
    We are using Apache Velocity for dynamic templates. At the moment Velocity has following methods for evaluation/replacing: public static boolean evaluate(Context context, Writer writer, String logTag, Reader reader) public static boolean evaluate(Context context, Writer out, String logTag, String instring) We use these methods by providing StringWriter to write evaluation results. Our incoming data is coming in StringBuilder format so we use StringBuilder.toString and feed it as instring. The problem is that our templates are fairly large (can be megabytes, tens of Ms on rare cases), replacements occur very frequently and each replacement operation triples the amount of required memory (incoming data + StringBuilder.toString() which creates a new copy + outgoing data). I was wondering if there is a way to improve this. E.g. if I could find a way to provide a Reader and Writer on top of same StringBuilder instance that only uses extra memory for in/out differences, would that be a good approach? Has anybody done anything similar and could share any source for such a class? Or maybe there any better solutions to given problem?

    Read the article

  • Create pdf file dynamically in vb.net for .net 1.1 framework

    - by Urbycoz
    I need to create a pdf file dynamically in vb.net. It needs to contain several images and lines of text. I am using VS 2003, so whatever solution I use will need to be compatible with the .net 1.1 framework. The current method I am using is wpcubed, but this requires that all images be converted to bmp format before adding them to the pdf, which can be extremely slow when dealing with a large number of images. I am aware that there are an awful lot of other 3rd party products that claim to do this, and I have had a search through them. But without registering, downloading, installing and writing code to use each of them in turn, it is very difficult to differentiate between them. So far I have looked into evo pdf and pdfsharp but neither seem to work with .net 1.1. (Although they don't make this abundantly clear.) Has anyone else found a method that works and they would recommend (a free one-if possible)?

    Read the article

  • Windows splash screen using GDI+

    - by Luther
    The eventual aim of this is to have a splash screen in windows that uses transparency but that's not what I'm stuck on at the moment. In order to create a transparent window, I'm first trying to composite the splash screen and text on an off screen buffer using GDI+. At the moment I'm just trying to composite the buffer and display it in response to a 'WM_PAINT' message. This isn't working out at the moment; all I see is a black window. I imagine I've misunderstood something with regards to setting up render targets in GDI+ and then rendering them (I'm trying to render the screen using straight forward GDI blit) Anyway, here's the code so far: //my window initialisation code void MyWindow::create_hwnd(HINSTANCE instance, const SIZE &dim) { DWORD ex_style = WS_EX_LAYERED ; //eventually I'll be making use of this layerd flag m_hwnd = CreateWindowEx( ex_style, szFloatingWindowClass , L"", WS_POPUP , 0, 0, dim.cx, dim.cy, null, null, instance, null); SetWindowLongPtr(m_hwnd ,0, (__int3264)(LONG_PTR)this); m_display_dc = GetDC(NULL); //This was sanity check test code - just loading a standard HBITMAP and displaying it in WM_PAINT. It worked fine //HANDLE handle= LoadImage(NULL , L"c:\\test_image2.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); m_gdip_offscreen_bm = new Gdiplus::Bitmap(dim.cx, dim.cy); m_gdi_dc = Gdiplus::Graphics::FromImage(m_gdip_offscreen_bm);//new Gdiplus::Graphics(m_splash_dc );//window_dc ;m_splash_dc //this draws the conents of my splash screen - this works if I create a GDI+ context for the window, rather than for an offscreen bitmap. //For all I know, it might actually be working but when I try to display the contents on screen, it shows a black image draw_all(); //this is just to show that drawing something simple on the offscreen bit map seems to have no effect Gdiplus::Pen pen(Gdiplus::Color(255, 0, 0, 255)); m_gdi_dc->DrawLine(&pen, 0,0,100,100); DWORD last_error = GetLastError(); //returns '0' at this stage } And here's the snipit that handles the WM_PAINT message: ---8<----------------------- //Paint message snippit case WM_PAINT: { BITMAP bm; PAINTSTRUCT ps; HDC hdc = BeginPaint(vg->m_hwnd, &ps); //get the HWNDs DC HDC hdcMem = vg->m_gdi_dc->GetHDC(); //get the HDC from our offscreen GDI+ object unsigned int width = vg->m_gdip_offscreen_bm->GetWidth(); //width and height seem fine at this point unsigned int height = vg->m_gdip_offscreen_bm->GetHeight(); BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY); //this blits a black rectangle DWORD last_error = GetLastError(); //this was '0' vg->m_gdi_dc->ReleaseHDC(hdcMem); EndPaint(vg->m_hwnd, &ps); //end paint return 1; } ---8<----------------------- My apologies for the long post. Does anybody know what I'm not quite understanding regarding how you write to an offscreen buffer using GDI+ (or GDI for that matter)and then display this on screen? Thank you for reading.

    Read the article

  • How to disable silverlight (when creating sites) in SharePoint 2010?

    - by Jay
    I have a custom site template in SharePoint 2010. It works well when there's no silverlight installed on machine. When there's silverlight on machine, after fill in the information for creating a sharepoint site and click ok it gives error without any explanation. Since there will be many editors I can't ask them to uninstall silverlight on all their machines. How to fix this, for me even using javascript to disable silverlight is ok. but how? Thanks.

    Read the article

  • Binding ComboBox Item with a text property of different DataContext

    - by Jhelumi786
    Hi Everyone, I have a comboBox as below. What I want is to bind the selectedItem value to a Text property of a datacontext so that another DataTemplate can show the Image. Please note that the Combobox and Target Image elements are on two different DataTemplates so that's why I need to update the Text Property (ImageName) ofDataContext at backend. <ComboBox x:Name="cboOverlay" Grid.Row="0" Grid.Column="1" SelectedIndex="0" > <ComboBoxItem Name="BC_OL" IsSelected="True"> <StackPanel Orientation="Horizontal"> <Image Source="Images\BC_OL.jpg" Width="100" Height="25" Canvas.Top="0" Canvas.Left="0" /> <TextBlock Width="100" VerticalAlignment="Center" TextAlignment="Center"><Bold>Image1</Bold></TextBlock> </StackPanel> </ComboBoxItem> <ComboBoxItem Name="Indian_OL"> <StackPanel Orientation="Horizontal"> <Image Source="Images\Indian_OL.jpg" Width="100" Height="25" Canvas.Top="0" Canvas.Left="0" /> <TextBlock Width="100" VerticalAlignment="Center" TextAlignment="Center"><Bold>Image2</Bold></TextBlock> </StackPanel> </ComboBoxItem> </ComboBox> <Image Source="{Binding Path=Image}" Width="81" Height="25" Canvas.Top="0" Canvas.Left="0" />

    Read the article

  • ESB Toolkit.exceptionHandling Error - The application does not exist - Any ideas?

    - by Andrew Cripps
    Hello I am getting following error while attempting to run the Management Portal for ESB Toolkit 2.0: Event Type: Warning Event Source: ENTSSO Event Category: Enterprise Single Sign-On Event ID: 10536 Description: SSO AUDIT Function: GetConfigInfo (SSOProperties) Application Name: ESB Toolkit.exceptionHandling Error Code: 0xC0002A04, The application does not exist I am using SSO config store for the ESB Config. However, looking in the esb.config file, there is no section, like there is for the other esb SSO applications. Why might this section (and therefore the SSO app) be missing? How can I set it up? Thanks for any help with this Andrew

    Read the article

  • control.focus() after selectedIndexChanged

    - by kyle
    I need to focus on a textbox after an item has been selected from a dropdownlist. I've tried control.focus() and setfocus(). The last thing I've tried was Set_Focus(dtbEffectiveDate.ClientID) inside the SelectedIndexChanged method with the folowing method. Protected Sub Set_Focus(ByVal ControlName As String) Dim strScript As String strScript = "<script language=javascript> window.setTimeout(""" + ControlName + ".focus();"",0); </script>" RegisterStartupScript("focus", strScript) End Sub I'm out of answers so any help would be awesome.

    Read the article

  • How to display icons next to a select1 control with xxforms:tree appearance

    - by user557060
    Hi, I display a list of items via select1 control using xxforms:tree appearance. They are displayed via a code block like: <xforms:itemset nodeset="instance('dataInstance')/*"> <xforms:label ref="fn:concat(./NAME,', ','ID: ',./ID)"/> <xforms:value ref="./ID"/> </xforms:itemset> </xforms:select1> I want to display two icons for each item on the same row as the item: one icon for deleting and one for editing that item, which would all invoke XPL with the item ID as the parameter. The question, how do I render those icons - does itemset support nested trigger elements? If not, how do I go about achieving it (clicking on the item results in an action other than edit or delete, so cannot use that; can show delete/edit on the page shown when user clicks on the item, but want to save that one click if the user just wants to delete the item for example). Thanks.

    Read the article

  • App Engine Bulkloader

    - by gurkan
    Hi all, I am trying to use Bulkloader of google app engine but unfortunately could not understand what to do from documentation. It says add this part to app.yaml builtins: - remote_api: on ok i have added. Then says that i have to execute this command appcfg.py update but i don't have any appcfg.py file. And also what is the command which executes this line? Please somebody tell me what i am missing I use AppEngineLauncher to upload my project to server.. I have naver used a command to update or upload it. Thanks in advance..

    Read the article

  • WordPress: Using a Where Clause With A Custom Field

    - by Steve Wilkison
    I have a bunch of events that are listed on a particular page. Each event is a post. I need them to display in the order in which they occur, NOT the order of the posting date. So, I've created a custom field called TheDate and enter in the date in this format for each one: 20110306. Then, I wrote my query like this: query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); Works perfectly and displays the events in the correct order. However, I also want it to ONLY display dates from today onward. I don't want it to display dates which have passed. It seems the way to do this is with a "filter." I tried this, but it doesn't work. $todaysdate = date('Ymd'); query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); function filter_where( $where = '' ) { $where .= "meta_value_num >= $todaysdate"; return $where; } add_filter( 'posts_where', 'filter_where' ); I figure it's just a matter of where I'm using this filter, I probably have it in the wrong place. Or maybe the filter itself is bad. Any help or guidance would be greatly appreciated. Thanks!

    Read the article

  • convolution in R

    - by user236215
    I tried to do convolution in R directly and using FFTs then taking inverse. But it seems from simple observation it is not correct. Look at this example: # DIRECTLY > x2$xt [1] 24.610 24.605 24.610 24.605 24.610 > h2$xt [1] 0.003891051 0.003875910 0.003860829 0.003845806 0.003830842 > convolve(h2$xt,x2$xt) [1] 0.4750436 0.4750438 0.4750435 0.4750437 0.4750435 # USING INVERSE FOURIER TRANSFORM > f=fft(fft(h2$xt)*fft(x2$xt), inv=TRUE) > Re(f)/length(f) [1] 0.4750438 0.4750435 0.4750437 0.4750435 0.4750436 > Lets take the index 0. At 0, the convolution should simply be the last value of x2$xt (24.610) multiplied by first value of h2$xt (0.003891051) which should give convolution at index 0 = 24.610*0.003891051 = 0.09575877 which is way off from 0.4750436. Am I doing something wrong? Why is the values so different from expected?

    Read the article

  • wordpress path url in js script file

    - by Cam
    I added custom script wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false); works great, except in the functions.js i have Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left"; now this used to work before, until changed to pretty permalinks and .htaccess the folder hierarchy is like: themename/js themename/images (the images and js folder are in themename folder) i tried ../images - ./image - /images normally it should go back 1 level where-ever the js file is located.... i dont want to use full path is there a other way that wordpress can recognize in the javascript file to have the correct path? currently i am just confused what i am doing wrong

    Read the article

  • Ninject with Object Initializers and LINQ

    - by Alexander Kahoun
    I'm new to Ninject so what I'm trying may not even be possible but I wanted to ask. I free-handed the below so there may be typos. Let's say I have an interface: public interface IPerson { string FirstName { get; set; } string LastName { get; set;} string GetFullName(); } And a concrete: public class Person : IPerson { public string FirstName { get; set; } public string LastName { get; set; } public string GetFullName() { return String.Concat(FirstName, " ", LastName); } } What I'm used to doing is something like this when I'm retrieving data from arrays or xml: public IEnumerable<IPerson> GetPeople(string xml) { XElement persons = XElement.Parse(xml); IEnumerable<IPerson> people = ( from person in persons.Descendants("person") select new Person { FirstName = person.Attribute("FName").Value, LastName = person.Attribute("LName").Value }).ToList(); return people; } I don't want to tightly couple the concrete to the interface in this manner. I haven't been able to find any information in regards to using Ninject with LINQ to Objects or with object initializers. I may be looking in the wrong places, but I've been searching for a day now with no luck at all. I was contemplating putting the kernel into an singleton instance and seeing if that would work, but I'm not sure that it will plus I've heard that passing your kernel around is a bad thing. I'm trying to implement this in a class library currently. If this is not possible, does anyone have any examples or suggestions as to what the best practice is in this case? Thanks in advance for the help. EDIT: Based on some of the answers I feel I should clarify. Yes, the example above appears short lived but it was simply an example of one piece that I was trying to do. Let's give a bigger picture. Say instead of XML I am gathering all my data through a 3rd party web service and I'm creating an interface for it, the data could be a defined object in the wsdl or it could sometimes be an xml string. IPerson could be used for both the Person object and a User object. I will be doing this inside of a separate class library, because it needs to be portable and will be used in other projects, and handing it to an MVC3 Web Application and the objects will be used in javascript as well. I appreciate all the input so far.

    Read the article

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