Search Results

Search found 233 results on 10 pages for 'pan tian'.

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

  • Why exactly do we use NoSQL?

    - by Tian H.
    Having understood some of the advantages that NoSQL offers (scalability, availability, etc.), I am still not clear why a website would want to use a non-relational database. Can I get some help on this, preferably with an example?

    Read the article

  • Obtaining memory available to JVM at runtime

    - by Bo Tian
    I'm trying to sort a bunch of data such that that the size of data input to the program can be larger than the memory available to the JVM, and handling that requires external sort which is much slower than Quicksort. Is there any way of obtaining memory available to the JVM at runtime such that I could use in place sorting as much as possible, and only switch to Mergesort when data input is too large?

    Read the article

  • Taxonomy terms are not translated in an exposed filters block

    - by Daj pan spokój
    Hi, in my view's exposed filters block the taxonomy terms are showed only in the original language version (in English). Vocabulary is set to Localize terms. The terms are translated via Translation Table. All the other content (Views, nodes, translated strings etc.) is showed correctly (in German). I'd expect them to appear in current language, however. Here for instance, I'd expect to have German Sommer 10 instead of English Summer 10. Do You have any idea how to solve it? I use Drupal 6 and Views 2.10

    Read the article

  • Formatting Button Position with Form_For

    - by Tian
    I am using form_for to create a form that has 1 input field and 1 button. I'd like the submit button to be beside the input field rather than underneath it. Relevant code is: .input{border: 1px solid #666666; width:400px; height:22px;font-size:16px;} <td width="900" height="50" align="left" valign="middle"> <% form_for @contact, :url => {:action => "create"}, :html => {:class => "input"} do |f| %> <%= f.text_field :email, :size=> 74 %> <%= image_submit_tag '2009-12-06-Landing1.gif' %> <% end %> </td>

    Read the article

  • Creating stereo file from two mono files with sox

    - by haimg
    I'm using sox 14.2.0 on Centos 6.0. I have two mono wav files, left.wav and right.wav. I need to combine them into one stereo.ogg file, with left.wav pan 80% to the left, and right.wav pan 80% to the right. I was unable to come up with the sox options needed for this. How do I do this? This is going to be executed repeatably for many files, so I'd prefer an efficient solution. From what I understand there should be a way to do it in one pass (one invocation of sox).

    Read the article

  • MPlayer refuses to generate mono wav file

    - by JCCyC
    I want to downsample an existing audio file to 8KHz mono. This command line downsamples it to stereo: mplayer -quiet -vo null -vc dummy -af volume=0,resample=8000:0:1 -ao pcm:waveheader:file="/tmp/blah1.wav" ~/from_my_cellphone.3ga It generates a file that the file utility identifies as stereo: $ file /tmp/blah1.wav /tmp/blah1.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 8000 Hz Now, if I read the documentation correctly, I should add pan=1:0.5:0.5 so I get a file that's half the size: mplayer -quiet -vo null -vc dummy -af volume=0,resample=8000:0:1:pan=1:0.5:0.5 -ao pcm:waveheader:file="/tmp/blah2.wav" ~/from_my_cellphone.3ga But it doesn't! blah2.wav is identical to blah1.wav! What am I doing wrong?

    Read the article

  • Gesture Detector not firing

    - by Tyler
    So I'm trying to create a input class that implements a InputHandler & GestureListener in order to support both Android & Desktop. The problem is that not all the methods are being called properly. Here is the input class definition & a couple of the methods: public class InputHandler implements GestureListener, InputProcessor{ ... public InputHandler(OrthographicCamera camera, Map m, Player play, Vector2 maxPos) { ... @Override public boolean zoom(float originalDistance, float currentDistance) { //this.zoom = true; this.zoomRatio = originalDistance / currentDistance; cam.zoom = cam.zoom * zoomRatio; Gdx.app.log("GestureDetector", "Zoom - ratio: " + zoomRatio); return true; } @Override public boolean touchDown(int x, int y, int pointerNum, int button) { booleanConditions[TOUCH_EVENT] = true; this.inputButton = button; this.inputFingerNum = pointerNum; this.lastTouchEventLoc.set(x,y); this.currentCursorPos.set(x,y); if(pointerNum == 1) { //this.fingerOne = true; this.fOnePosition.set(x, y); } else if(pointerNum == 2) { //this.fingerTwo = true; this.fTwoPosition.set(x,y); } Gdx.app.log("GestureDetector", "touch down at " + x + ", " + y + ", pointer: " + pointerNum); return true; } The touchDown event always occurs but I can never trigger Zoom (or pan among others...). The following is where I register and create the input handler in the "Game Screen". public class GameScreen implements Screen { ... this.inputHandler = new InputHandler(this.cam, this.map, this.player, this.map.maxCamPos); Gdx.input.setInputProcessor(this.inputHandler); Anyone have any ideas why zoom, pan, etc... are not triggering? Thanks!

    Read the article

  • Something about traveling in china?

    - by user79989
    Well, i am Chinese ,i am in China, if you want to go to trvalling to China , you must must go to Beijing and the city of Xi' an , because of if you go to China you have to go to Beijing , eveyone in China wants to go to Beijing to play at Tian an men Place .The back of the square is the home of the ancient Chinese emperors , and you must know about Chinese Chang Cheng ,you can also see it in Beijing , and don't need to talk too much ,you must know Beijing , and there also has many modern culutures ,such like 798 arts center , and the SANLITUN village , and many many many foregner love to go to NAN LUO GU XIANG. ChinaTour.com is a reliable China Travel Agency based in USA, which has specialized in inbound China travel for decades. We provide a spectrum of private China tours, China group tours, customized China tours, China hotel booking and China-USA air ticket booking service for individuals, groups, families, students etc.

    Read the article

  • Programming habits, patterns, and standards that have developed out of appeal to tradition/by mistake? [closed]

    - by user828584
    Being self-taught, the vast majority of what I know about programming has come from reading other peoples' code on websites like this. I'm starting to wonder if I've developed bad or otherwise pointless habits from other people, or even just made invalid assumptions. For example, in javascript, void 0 is used in a lot of places, and until I saw this, I just assumed it was necessary and that 0 had some significance. Also, the http header, referer is misspelled but hasn't been changed because it would break a lot of applications. Also mentioned in Code Complete 2: The architecture should describe the motivations for all major decisions. Be wary of “we’ve always done it that way” justifications. One story goes that Beth wanted to cook a pot roast according to an award-winning pot roast recipe handed down in her husband’s family. Her husband, Abdul, said that his mother had taught him to sprinkle it with salt and pepper, cut both ends off, put it in the pan, cover it, and cook it. Beth asked, “Why do you cut both ends off?” Abdul said, “I don’t know. I’ve always done it that way. Let me ask my mother.” He called her, and she said, “I don’t know. I’ve always done it that way. Let me ask your grandmother.” She called his grandmother, who said, “I don’t know why you do it that way. I did it that way because it was too big to fit in my pan.” What are some other examples of this?

    Read the article

  • UIScrollView image/photo viewer with paging enabled and zooming

    - by Mike Weller
    OK, I think it's time to make an official place on the internet for this problem: How to make a UIScrollView photoviewer with paging and zooming. Welcome my fellow UIScrollView hackers. I have a UIScrollView with paging enabled, and I'm displaying UIImageViews like the built-in photos app. (Does this sound familiar yet?) I found the following project on github: http://wiki.github.com/andreyvit/ScrollingMadness Which shows how to implement zooming in a scroll view while paging is enabled. If anyone else tries this out, I actually had to remove the UIScrollView subclass and use the native class otherwise it doesn't work. I think it's because of changes in the 3.0 SDK relating to how the scroll view intercepts touch events. So the the idea is to remove all the other views when you start zooming, and move the current view to (0, 0) in the scrollview, updating the contentsize etc. Then when you zoom back to 1.0f it adds the other views back and puts things all back in order. Anyway, that project works perfectly in the simulator, but on the device there is some nasty movement of the view you are resizing, which looks like it's caused by the fact we are changing the contentsize/offset etc. for the view being resized. You have to do this view moving otherwise you can pan left through the whitespace left by the other views. I found one interesting note in the "Known Issues" of the 3.0 SDK release notes: UIScrollView: After zooming, content inset is ignored and content is left in the wrong position. This kind of sounds like what is happening here. After zooming in, the view will shift offscreen because you have changed the offset etc. I've spent hours on this already and I'm slowing coming to the sad realization that this just isn't going to work. Three20's photo viewer is out of the question: it's too heavy weight and there is too much unnecessary UI and other behaviour. The built in Photo app seems to do some magic. If you zoom in on an image and pan to the far edges, the current photo moves independently of the photo next to it which isn't what you get when trying this with a standard UIScrollView. I've seen discussion about nesting the UIScrollView's but I really don't want to go there. Has anybody managed this with the standard UIScrollView (and works in the 2.2 and 3.0 SDK)? I don't fancy rolling my own zoom + bounce + pan + paging code.

    Read the article

  • Is there anyway I can fix a webview?

    - by Legend
    I am trying to load a webpage into a sample webview that I created: public class HelloWebview extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview; webview = (WebView) findViewById(R.id.webview); webview.getSettings().setDefaultZoom(ZoomDensity.FAR); webview.setHorizontalScrollBarEnabled(false); webview.setVerticalScrollBarEnabled(false); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("http://10.0.2.2/index.html"); } } Initially, I had a problem with the scrollbars so I added the two lines to disable them. Now, I am still able to pan around the webpage though the scroll bars are not visible. How can I fix the view so that I am not able to pan (or scroll) the webpage? By panning, I mean moving around the webpage with an onTouch event.

    Read the article

  • Design a GUI browser to view a tree

    - by iamrohitbanga
    I have a large tree. I want to be able to visualize it using a GUI tool. I want the ability to pan and zoom the tree image so that i can focus on part of the tree. Is there an existing tool to achieve this? If not i would like to write a small tool for myself to be able to do this. what is the simplest way of doing this? what computer language should i use? the image should look something like http://upload.wikimedia.org/wikipedia/commons/d/df/Binary_tree.png I should be able to zoom and pan the image.

    Read the article

  • Page zoom slows down page rendering

    - by Alex
    I'm building a map viewer much like Google maps and i've run into an interesting performance problem when a page is zoomed (i.e ctrl + OR ctrl -). It seems to affect all major browsers but Firefox has the worst problems as far as I can tell. The problem is that when the page is zoomed panning by dragging the mouse seems really sluggish. This can even be seen on Google maps. Pan the map left and right and note how smooth it is. Now press ctrl+ (3 or 4 times). Now pan the map left and right in the same way. Notice the difference? Does anyone know how I can minimize this problem?

    Read the article

  • Delay function from running for n seconds then run it once. (2minute question)

    - by Ozaki
    TLDR I have a function that runs on the end of a pan in an openlayers map. Don't want it to fire continously. I have a function that runs on the end of panning a map. I want it so that it will not fire the function until say 3 secconds after the pan has finished. Although I don't want to queue up the function to fire 10 or so times like setTimeout is currently doing. How can I delay a function from running for n seconds then run it only once no matter how many times it has been called?

    Read the article

  • How to have a UISwipeGestureRecognizer AND UIPanGestureRecognizer work on the same view

    - by Shizam
    How would you setup the gesture recognizers so that you could have a UISwipeGestureRecognizer and a UIPanGestureRecognizer work at the same time? Such that if you touch and move quickly (quick swipe) it detects the gesture as a swipe but if you touch then move (short delay between touch & move) it detects it as a pan? I've tried various permutations of requireGestureRecognizerToFail and that didn't help exactly, it made it so that if the SwipeGesture was left then my pan gesture would work up, down and right but any movement left was detected by the swipe gesture.

    Read the article

  • Show all objects on canvas in window

    - by Number8
    Hello -- We have a canvas with a large number of objects. The user can pan and zoom the view of the canvas. I am trying to figure out how to implement "show entire canvas" -- that is, zoom and center the canvas in the window to show all objects. We know the max and min X and Y coordinates. I am looking at our current zoom and pan implementations to try to figure out if there is a way to use them. Any suggestions on how to do this would be appreciated... Thanks.

    Read the article

  • I need to generate credit card surrogates (tokens) that are format preserving.

    - by jammer59
    For an eCommerce application I need to take a credit card and use the real card for passing through to a payment gateway but I need to store, and return to the transaction initiator, a surrogate that is format preserving. Specifically, this means: 1) The number of digits in the surrogate is the same as the real card number (PAN). 2) The issuer type part of the card -- the initial 1,2 or 4 digits remains the same in the surrogate as in the original PAN. 3) The final 4 digits of the surrogate remain the same (for customer service purposes.) 4) The surrogate passes the Luhn mod10 check for a syntactially valid credit card. I can readily handle requirements 1-3 but #4 has me completely stumped! The final implementation will be either t-sql or c#. Any ideas?

    Read the article

  • Windows Mobile 6.5 flick (scrolling with inertia) not working

    - by GRR
    After upgrading to windows mobile 6.5, my ListView control does not work properly with custom items (rows with alternate colors) and the new gesture mechanism... On a mobile device, if the user initiates a flick or pan, after scrolling the first few items, the last items are not shown on the screen, but will show up if the user explicitly taps on them -- so basically the last screen is just white. The WM_DRAWITEM message is sent to all children though, but they just don't show up on the screen. Scrolling with a bar works fine. Any ideas? I have seen some reports of similar behavior from other users, but not sure if this is a bug in the listview control itself or if there is something else that needs to/can be implemented to support flick and pan actions. The application code currently doesn't handle WM_GESTURE messages, so the flick action is done with Microsoft's own code to support legacy applications. Thanks!

    Read the article

  • How can I link axes of imshow plots for zooming and panning?

    - by Adam Fraser
    Suppose I have a figure canvas with 3 plots... 2 are images of the same dimensions plotted with imshow, and the other is some other kind of subplot. I'd like to be able to link the x and y axes of the imshow plots so that when I zoom in one (using the zoom tool provided by the NavigationToolbar), the other zooms to the same coordinates, and when I pan in one, the other pans as well. Subplot methods such as scatter and histogram can be passed kwargs specifying an axes for sharex and sharey, but imshow has no such configuration. I started hacking my way around this by subclassing NavigationToolbar2WxAgg (shown below)... but there are several problems here. 1) This will link the axes of all plots in a canvas since all I've done is get rid of the checks for a.in_axes() 2) This worked well for panning, but zooming caused all subplots to zoom from the same global point, rather than from the same point in each of their respective axes. Can anyone suggest a workaround? Much thanks! -Adam from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg class MyNavToolbar(NavigationToolbar2WxAgg): def __init__(self, canvas, cpfig): NavigationToolbar2WxAgg.__init__(self, canvas) # overrided # As mentioned in the code below, the only difference here from overridden # method is that this one doesn't check a.in_axes(event) when deciding which # axes to start the pan in... def press_pan(self, event): 'the press mouse button in pan/zoom mode callback' if event.button == 1: self._button_pressed=1 elif event.button == 3: self._button_pressed=3 else: self._button_pressed=None return x, y = event.x, event.y # push the current view to define home if stack is empty if self._views.empty(): self.push_current() self._xypress=[] for i, a in enumerate(self.canvas.figure.get_axes()): # only difference from overridden method is that this one doesn't # check a.in_axes(event) if x is not None and y is not None and a.get_navigate(): a.start_pan(x, y, event.button) self._xypress.append((a, i)) self.canvas.mpl_disconnect(self._idDrag) self._idDrag=self.canvas.mpl_connect('motion_notify_event', self.drag_pan) # overrided def press_zoom(self, event): 'the press mouse button in zoom to rect mode callback' if event.button == 1: self._button_pressed=1 elif event.button == 3: self._button_pressed=3 else: self._button_pressed=None return x, y = event.x, event.y # push the current view to define home if stack is empty if self._views.empty(): self.push_current() self._xypress=[] for i, a in enumerate(self.canvas.figure.get_axes()): # only difference from overridden method is that this one doesn't # check a.in_axes(event) if x is not None and y is not None and a.get_navigate() and a.can_zoom(): self._xypress.append(( x, y, a, i, a.viewLim.frozen(), a.transData.frozen())) self.press(event)

    Read the article

  • Distrilogie muda de nome para Altimate

    - by Paulo Folgado
     O Grupo Distrilogie entra numa nova dimensão O Distribuidor de valor acrescentado em TI aposta numa mudança radical: muda de nome e de imagem, para passar a ser Altimate - Smart IT Distributor   Lisboa, 5 de Maio de 2010 - Para o grupo de reconhecido sucesso, o principal ponto forte está na mudança: a partir de hoje, a Distrilogie Portugal, Espanha, Bélgica, Luxemburgo, Holanda e França, bem como todas as suas aquisições, deixam o seu nome e formam o novo grupo Altimate. Na Península Ibérica, esta mudança afecta o grupo Distrilogie Iberia, formado pela Distrilogie Portugal, Distrilogie Espanha e Mambo Technology, o distribuidor especializado em segurança do grupo.   Altimate: uma marca com grandes ambições europeias Esta mudança assenta na vontade de reforçar um grupo de longo e frutífero trajecto, que conta com os melhores talentos e uma diversificada gama de soluções altamente complementares. "Continuar a crescer ao nosso ritmo (+27% este ano), em tempos como os de agora, passa por desenvolver todas as sinergias possíveis dentro do nosso grupo, e não só a nível nacional e regional, mas também pan-europeu. O nosso grupo goza, a nível internacional, de uma grande diversidade de soluções, que se complementam entre si. É uma riqueza que queremos aproveitar e desenvolver a nível de cada país, consolidando o nosso portfólio pan-europeu. Trata-se de um ponto fundamental para o crescimento futuro, agora que o mercado dos principais fabricantes tende à concentração", explica Alexis Brabant, Director-Geral da Altimate Iberia e membro do Comité Executivo Europeu do Grupo Altimate.   Por outro lado, a criação da Altimate assenta numa ambiciosa estratégia de expansão e consolidação por todo o continente. Entre outros objectivos fundamentais, a Altimate pretende estabelecer-se em 4 novos países da União Europeia nos próximos 2 anos. Assim o ilustra Patrice Arzillier, fundador da Distrilogie e PDG do grupo Altimate: "Graças ao apoio incondicional do nosso accionista DCC, o nosso grupo conheceu um desenvolvimento notável. Hoje, a criação da Altimate marca uma nova etapa de crescimento combinando solidez económica, ambição de expansão europeia e manutenção dos nossos valores fundadores."  Altimate: alta proximidade Tal como a Distrilogie, o novo grupo Altimate tem como missão o sucesso dos seus parceiros e fabricantes. Para a cumprir, continuará a potenciar a proximidade das suas equipas - altamente qualificadas e voltadas para a identificação das soluções mais inteligentes, inovadoras e adequadas.  Para mais informações acerca da Altimate, visite o novo site . http://www.altimate-group.com  

    Read the article

  • Android Photosphere Viewer Application

    - by Frisbetarian
    I'm aiming to develop an android app that simply views photosphere files. It should utilize the compass to pan around the sphere when the user moves his/her phone. I'm not aiming to create photospheres via the phone's camera with it, just upload the necessary jpegs and view them. Could anyone offer any advice as to how I could go about with implementing an API that views and gives the option to manipulate photosphere files?

    Read the article

  • breadcrumb dilemma -SEO impact

    - by HaCos
    i am updating the breadcrumb module of an commerce website, implementing microdata (schema.org). My dilemma is about showing last page: a.product name on breadcrumb or not? b.Should that be active link to current page or not? eg: http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.urbanspoon.com%2Fr%2F23%2F1600592%2Frestaurant%2FPoint-Breeze%2FAlma-Pan-Latin-Kitchen-Pittsburgh urbanspoon example doesnt link last page, but is this right?

    Read the article

  • Acer touchpad multitouch not working

    - by Lassi
    I tried to get my Acer laptop's touchpad working properly. I installed driver package (psmouse-alps-dkms_0.10_all) which made the side scrolling working. However, the touchpad supports multitouch (works on Windows), but Synaptiks claims that only 1 finger is detected by the touchpad. Thus 2 finger scrolling, pinch & pan zoom and those are not working. Any ideas how I could get these multi-finger gestures working?

    Read the article

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