Search Results

Search found 72 results on 3 pages for 'carlo adap'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • wpf listview drag select multiple items

    - by Carlo
    Just wondering if anyone has any idea on how to do this. I want to let the user select multiple items by clicking and dragging the mouse (without letting the click go). Say the user clicks on item 1, then drags down to item 10; item 1 through 10 should get selected as if he clicked item 1, then shift + clicked on item 10. Let me know thanks!

    Read the article

  • When to choose LAMP over ASP.NET?

    - by Carlo
    Hello. A friend wants to start a dating website, she wants me to help her. We still haven't discussed on what platform it'll be developed, but I'm thinking she'll suggest LAMP to save a buck (which is one reason already to chose over ASP.NET already). If the dating website does well, it'll potentially hold a large amount of data (I'm not sure if this would be another reason to consider either ASP.NET or LAMP). Anyway, I ask this from an ASP.NET developer point of view. I have very little, almost null experience with LAMP, and I don't like it very much either, so if she decides to go with PHP odds are I won't help her. So what would be some good points to bring up when deciding which platform to develop on? Please be objective, I don't want this to be argumentative or anything, try to stick to facts, not opinions alone. Thanks!

    Read the article

  • ApplicationCommand.Paste happens twice

    - by Carlo
    Hi, well this is driving me crazy. We have a command like so: <CommandBinding Command="ApplicationCommands.Paste" CanExecute="HasClipboardData" Executed="OnPasteExecuted"/> And the code for OnPasteExecuted is this: private void OnPasteExecuted(object sender, ExecutedRoutedEventArgs e) { CurrentView.Paste(); e.Handled = true; } That code gets executed twice, and I have no idea why, we also have the other commands: Cut, Copy, Undo, Redo, those work just fine, the problem is only with Paste. Let me know if you have any idea of what could be going on. Thanks!

    Read the article

  • Null reference exceptions in .net

    - by Carlo
    Hello, we're having this big problem with our application. It's a rather large application with several modules, and thousands and thousands lines of code. A lot of parts of the application are designed to exist only with a reference to another object, for example a Person object can never exists without a House object, so if you at any point in the app say: bool check = App.Person.House == null; check should always be false (by design), so, to keep using that example, while creating modules, testing, debugging, App.Person.House is never null, but once we shipped the application to our client, they started getting a bunch of NullReferenceException with the objects that by design, should never have a null reference. They tell us the bug, we try to reproduce it here, but 90% of the times we can't, because here it works fine. The app is being developed with C# and WPF, and by design, it only runs on Windows XP SP 3, and the .net framework v3.5, so we KNOW the user has the same operative system, service pack, and .net framework version as we do here, but they still get this weird NullReferenceExceptions that we can't reproduce. So, I'm just wondering if anyone has seen this before and how you fixed it, we have the app running here at least 8 hours a day in 5 different computers, and we never see those exceptions, this only happens to the client for some reason. ANY thought, any clue, any solution that could get us closer to fixing this problem will be greatly appreciated. Thanks!

    Read the article

  • C#: Take Out Image Portion of JPEG to Backup Metadata?

    - by Carlo Mendoza
    This will be a little backwards from the typical approach. I've used ExifTool for metadata manipulation before, but I really want to keep the best metadata backup I can before I make anything permanent. What I want to do is remove the compressed image portion of a JPEG file to leave everything else intact. That's backing up EXIF, Makernotes, IPTC, XMP, etc whether at the beginning or end of the file. What I've tried so far is to strip all metadata from a copy of the original JPEG, and use it as a basis of what bytes will be taken out of the original. After looking at the raw data, it doesn't seem like the stripped copy is contiguous in the original copy. There may be some header information still remaining in the stripped version. I don't really know. Not a good way to do it, I suppose. Are there any markers that will absolutely tell me where the compressed JPEG image data starts and ends? I understand that JPEG files have 0xFFD8 and 0xFFD9 to mark the start and end of the image, but have come to find out that metadata is actually between those markers. I'm using C#. Thank you.

    Read the article

  • Path vs GeometryDrawing

    - by Carlo
    Just wondering what's lighter, I'm going to have a control that draws 280 * 4 my SegmentControl, which is a quarter of a circle, and I'm just wondering what's the way that takes least memory to draw said segment. GeometryDrawing: <Image> <Image.Source> <DrawingImage> <DrawingImage.Drawing> <GeometryDrawing Brush="LightBlue" Geometry="M24.612317,0.14044853 C24.612317,0.14044853 33.499971,-0.60608719 41,7.0179795 48.37642,14.516393 47.877537,23.404541 47.877537,23.404541 L24.60978,23.401991 z" /> </DrawingImage.Drawing> </DrawingImage> </Image.Source> </Image> Or Path: <Path Fill="LightBlue" Stretch="Fill" Stroke="#FF0DA17D" Data="M24.612317,0.14044853 C24.612317,0.14044853 33.499971,-0.60608719 41,7.0179795 48.37642,14.516393 47.877537,23.404541 47.877537,23.404541 L24.60978,23.401991 z" /> Or if you know of an even better way, it'll be much appreciated. Thanks!

    Read the article

  • Does javascript event handling occur inside or outside the program flow?

    - by Carlo Roosen
    This question is related to Javascript event handling and flow control, but it is one step beyond. The question that remains unanswered is: when an event is fired and control is returned to the browser, could the browser decide to handle other events first (fired by other scripts or user action) (A), or will it always handle my event directly (B)? The question is important, because in case (B) you can rely on the fact that nothing has been changed between firing the event and the event handler, while (A) gives no guarantees whatsoever. My first guess is (B), how else could stopPropagation() and preventDefault() work? But giving it a second thought, it is no hard evidence.

    Read the article

  • What method can I override in GridViewHeaderRowPresenter to prevent it from drawing some columns?

    - by Carlo
    The thing is that I created a custom column that inherits from GridViewColumn, and I added a Visibility dependency property to it. Now I want to create a custom GridViewHeaderRowPresenter, that does not draw the columns when their visibility is hidden or collapsed, but other than the OnRender() method, I can't think of anything else. Thanks. Btw, the reason I'm doing this is because removing or adding columns doesn't work like we would expect it (some specs for our app) and I believe what I'm trying to do here would work if pulled out correctly.

    Read the article

  • Indirect property notification

    - by Carlo
    Hello, this question might look a little trivial, but it might not be. I'm just wondering which of the following two cases is better for indirect property notification, or perhaps there is an even better way. The scenario: I have two properties, the first one is an object called HoldingObject, the second one is a boolean called IsHoldingObject, which is false if HoldingObject == null, otherwise it's true. I'm just wondering what is the best notification mechanism for IsHoldingObject: Case (A) - Notify IsHoldingObject changed from the HoldingObject proeperty: public class NotifyingClass1 : INotifyPropertyChanged { private object _holdingObject; public object HoldingObject { get { return _holdingObject; } set { if (_holdingObject != value) { _holdingObject = value; NotifyPropertyChanged("HoldingObject"); // Notify from the property that is being checked NotifyPropertyChanged("IsHoldingObject"); } } } public bool IsHoldingObject { get { return this.HoldingObject == null; } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string propertyName) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } #endregion } Case (B) - Notify IsHoldingObject changed from the IsHoldingObject directly, by setting it to false or true from HoldingObject property: public class NotifyingClass2 : INotifyPropertyChanged { private object _holdingObject; public object HoldingObject { get { return _holdingObject; } set { if (_holdingObject != value) { _holdingObject = value; NotifyPropertyChanged("HoldingObject"); // 1) Set the property here this.IsHoldingObject = _holdingObject != null; } } } private bool _isHoldingObject; public bool IsHoldingObject { get { return _isHoldingObject; } set { if (_isHoldingObject != value) { _isHoldingObject = value; // 2) Notify directly from the property NotifyPropertyChanged("IsHoldingObject"); } } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string propertyName) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } #endregion } I personally lean to the first one because it requires less code, but I'm not sure how recommendable it is to do that. Let me know if there is another (better) way. Thanks!

    Read the article

  • Uniform grid Rows and Columns

    - by Carlo
    I'm trying to make a grid based on a UniformGrid to show the coordinates of each cell, and I want to show the values on the X and Y axes like so: _A_ _B_ _C_ _D_ 1 |___|___|___|___| 2 |___|___|___|___| 3 |___|___|___|___| 4 |___|___|___|___| Anyway, in order to do that I need to know the number of columns and rows in the Uniform grid, and I tried overriding the 3 most basic methods where the arrangement / drawing happens, but the columns and rows in there are 0, even though I have some controls in my grid. What method can I override so my Cartesian grid knows how many columns and rows it has? C#: public class CartesianGrid : UniformGrid { protected override Size MeasureOverride(Size constraint) { Size size = base.MeasureOverride(constraint); int computedColumns = this.Columns; // always 0 int computedRows = this.Rows; // always 0 return size; } protected override Size ArrangeOverride(Size arrangeSize) { Size size = base.ArrangeOverride(arrangeSize); int computedColumns = this.Columns; // always 0 int computedRows = this.Rows; // always 0 return size; } protected override void OnRender(DrawingContext dc) { int computedColumns = this.Columns; // always 0 int computedRows = this.Rows; // always 0 base.OnRender(dc); } } XAML: <local:CartesianGrid> <Label Content="Hello" /> <Label Content="Hello" /> <Label Content="Hello" /> <Label Content="Hello" /> <Label Content="Hello" /> <Label Content="Hello" /> </local:CartesianGrid> Any help is greatly appreciated. Thanks!

    Read the article

  • File.Copy with opened stream not crashing. Know why?

    - by Carlo
    I have this code, I open a stream (without closing or disposing it), then I copy the file used by the stream, I thought I should get a "Process can't access file somefile.xml because it's being used by another process" exception, but I don't. Any idea why? Thanks! The code: StreamWriter writer = new StreamWriter("C:\\somefile.xml"); writer.Write(string.Empty); // I thought this should crash since a stream is using "C:\somefile.xml" File.Copy("C:\\somefile.xml", "C:\\copy of somefile.xml", true);

    Read the article

  • WPF bound object update notification

    - by Carlo
    I have a TreeView with a few objects bound to it, let's say something like this: public class House { public List<Room> Rooms { get; set; } public List<Person> People { get; set; } public House() { this.Rooms = new List<Room>(); this.People = new List<Person>(); } public void BuildRoom(string name) { this.Rooms.Add(new Room() { Name = name }); } public void DestroyRoom(string name) { this.Rooms.Remove(new Room() { Name = name }); } public void PersonEnter(string name) { this.People.Add(new Person() { Name = name }); } public void PersonLeave(string name) { this.People.Remove(new Person() { Name = name }); } } public class Room { public string Name { get; set; } } public class Person { public string Name { get; set; } } The TreeView is watching over the House object, whenever a room is built / destroyed or a person enters / leaves, my tree view updates itself to show the new state of the house (I omitted some implementation details for simplicity). What I want is to know the exact moment when this update finishes, so I can do something right there, the thing is that I created an indicator of the selected item, and when something moves, I need to update said indicator's position, that's the reason I need it exactly when the tree view updates. Let me know if you know a solution to this. Also, the code is not perfect (DestroyRoom and PersonLeave), but you get the idea. Thanks!

    Read the article

  • Client Profile Application prerequisites

    - by Carlo
    One last question about Client Profile installation. I downloaded the Microsoft .NET Framework Client Profile Online Installer because we want to put it in the installation CD because our end user might not have either .net framework 3.5 or internet. So we want to be able to handle both cases. In the prerequisites I'm able to select the location of where the file will be, but I don't know where it should be. I want to be able to somehow put the path of the cd, something like d:\ProductName\Prerequisites\DotNetFx35ClientSetup.exe so it can get it and install it from there. Does anyone have an idea of how this can be achieved? Thank you. Here's the prerequisites window:

    Read the article

  • How to connect to local database via website?

    - by Carlo
    Hi I have a website used by clients for reporting purposes and would like to give clients the option of my website reading their local database directly (instead of them providing data in a file format). In most instances their database would be SQL Express setup on their localhost. How can I connect to a clients local SQL server via my website, using asp.net / javascript etc? If the client provides their connection string properties, localhost would just refer to my server's localhost... Thanks

    Read the article

  • Windows 8 sortirait le 1er juillet 2011, info ou intox ?

    Mise à jour du 12.03.2010 par Katleen Windows 8 sortirait le 1er juillet 2011, info ou intox ? Et une nouvelle rumeur sur Windows 8, une ! Il semblerait qu'un employé de Redmond ait réalisé une feuille de route qui indiquerait une date de sortie pour le prochain système d'exploitation de Microsoft. Si on en croit ce document (à prendre avec des pincettes, car son origine microsoftienne n'est qu'une rumeur, même si les dates qu'il cite pour d'autres sorties se sont révélées exactes), Windows 8 devrait être livré le premier juillet 2011. Ce qui n'est séparé de nous que de...17 mois. Le noyau du nouvel OS devrait être totalement remodelé afin de s'adap...

    Read the article

  • AI Game Programming : Bayesian Networks, how to make efficient?

    - by Mahbubur R Aaman
    We know that AI is one of the most important part of Game Programming. Bayesian networks is one of the core part of AI at Game Programming. Bayesian networks are graphs that compactly represent the relationship between random variables for a given problem. These graphs aid in performing reasoning or decision making in the face of uncertainty. Here me, utilizing the monte carlo method and genetic algorithms. But tooks much time and sometimes crashes due to memory. Is there any way to implement efficiently?

    Read the article

  • Collision Detection algorithms with early Collision exit

    - by Grieverheart
    I'm using collision detection in Monte Carlo simulations and at the moment I'm using GJK which is quite fast. I can't help to think it could be done even faster though. In the simulations, about 70% of the time GJK is run, it detects a collision. Thus collisions are more than non-collisions in my case. Most collision detection algorithms I know have an early non-collision exit test. Are there any collision detection algorithms that have an early collision detect instead of non-collision and could be potentially faster than GJK in case of collision?

    Read the article

  • Where to find algorithms work?

    - by Misha
    The funnest parts of my projects have been the back-end algorithms work. I have worked on projects where I implemented Gaussian Mixture models, a Remez algorithm and a few Monte Carlo schemes. I loved figuring out how these processes worked and tuning them when they didn't. I recently graduated and my problem lies in the work I was able to find. The only jobs I have found, with my Electrical Engineering degree, are for writing user applications. Tasks such as fashioning web interfaces or front-ends for hardware devices. When I speak with potential employers about my interests they say they have no work of the sort. Where does one find work that involves implementing these kind of schemes?

    Read the article

  • Enhancing Enterprise Planning and Forecasting Through Predictive Modeling

    Planning and forecasting performance in today's volatile economic environment can be challenging with traditional planning applications and manual modeling techniques. To address these challenges, leading edge companies are leveraging predictive modeling to bring statistical analysis and techniques such as Monte Carlo simulations into the mix. Sound too math-intense and complicated? Not anymore. These techniques can be applied by anyone - no prior stats experience required - whether to augment the forecasting performed by line managers or to validate those forecasts based on historical information, and to produce a broader range of scenarios to consider in decision-making.

    Read the article

  • Is there a C# library that will perform the Excel NORMINV function?

    - by Portman
    I'm running some Monte Carlo simulations and making extensive use of the Excel function NORM.INV using Office Interrop. This functions takes three arguments (probability, average, standard deviation) and returns the inverse of the cumulative distribution. I'd like to move my code into a web app, but that will require installing Excel on the server. Does anybody know of a C# statistics library that has an equivalent function to NORM.INV?

    Read the article

  • Financial applications on GPGPU

    - by CUDA-dev
    I want to know what sort of financial applications can be implemented using a GPGPU. I'm aware of Option pricing/ Stock price estimation using Monte Carlo simulation on GPGPU using CUDA. Can someone enumerate the various possibilities of utilizing GPGPU for any application in Finance domain,

    Read the article

  • C vs. C++ for performance in memory allocation

    - by Andrei
    Hi, I am planning to participate in development of a code written in C language for Monte Carlo analysis of complex problems. This codes allocates huge data arrays in memory to speed up its performance, therefore the author of the code has chosen C instead of C++ claiming that one can make faster and more reliable (concerning memory leaks) code with C. Do you agree with that? What would be your choice, if you need to store 4-16 Gb of data arrays in memory during calculation?

    Read the article

  • Cannot understand NullPointerException with custom adapter

    - by ganesh
    hi, I am trying to create a list view which as TextView that can display html content , an WebView and other basic TextViews.I tried to extend SimpleAdapter but i struck with the problem ,I will be glad if someone can point out the mistake i am doing. In onCreate method ArrayList mylist= resultfromXmlparser(); adap = new MyAdapter(TourLandingPage.this, mylist, R.layout.row, new String[] {"Name", "desc","Duration","Price","imgurl"}, new int[] {R.id.productname,R.id.des,R.id.duration,R.id.pricefrom,R.id.photo}); setListAdapter(adap); My custom Adapter looks like this private class MyAdapter extends SimpleAdapter { ArrayList<HashMap<String,String>> elements; Context ctx; public MyAdapter(Context context, ArrayList<HashMap<String,String>> mylist,int textViewResourceId,String[] names,int[] resouceid) { super(context, mylist,textViewResourceId, names,resouceid); this.elements=mylist; this.ctx=context; } @Override public int getCount() { return elements.size(); } @Override public Object getItem(int position) { return elements.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { RelativeLayout rowLayout; if (convertView == null) { rowLayout = (RelativeLayout) LayoutInflater.from(ctx).inflate(R.layout.rowfor_tourlist, parent, false); } else { rowLayout = (RelativeLayout) convertView; } TextView in = (TextView)rowLayout.findViewById(R.id.introduction); TextView du = (TextView)rowLayout.findViewById(R.id.duration); TextView pf = (TextView)rowLayout.findViewById(R.id.pricefrom); TextView pn = (TextView)rowLayout.findViewById(R.id.productname); WebView wv=(WebView)rowLayout.findViewById(R.id.photo); in.setText(Html.fromHtml(mylist.get(position).get("desc"))); du.setText(mylist.get(position).get("Duration")); pf.setText(mylist.get(position).get("Price")); pn.setText(mylist.get(position).get("Name")); wv.getSettings().setJavaScriptEnabled(true); wv.loadUrl(mylist.get(position).get("imgurl")); return convertView; } }//class and my row.xml file looks like RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" TextView android:id="@+id/productname" ...... LinearLayout android:layout_width="wrap_content" android:layout_height="60dip" android:layout_margin="5dip" android:layout_below="@id/productname" android:orientation="horizontal" android:id="@+id/lay1" WebView android:id="@+id/photo" .... TextView android:id="@+id/introduction" ...... LinearLayout TextView android:id="@+id/duration" .... TextView android:id="@+id/pricefrom" ..... RelativeLayout The error i was getting was 04-28 19:46:17.749: ERROR/AndroidRuntime(976): Uncaught handler: thread main exiting due to uncaught exception 04-28 19:46:17.769: ERROR/AndroidRuntime(976): java.lang.NullPointerException 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.ListView.setupChild(ListView.java:1693) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.ListView.makeAndAddView(ListView.java:1671) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.ListView.fillDown(ListView.java:637) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.ListView.fillFromTop(ListView.java:694) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.ListView.layoutChildren(ListView.java:1521) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.AbsListView.onLayout(AbsListView.java:1113) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1108) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.onLayout(LinearLayout.java:920) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.onLayout(LinearLayout.java:918) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.LinearLayout.onLayout(LinearLayout.java:918) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.View.layout(View.java:6831) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.ViewRoot.performTraversals(ViewRoot.java:996) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.os.Handler.dispatchMessage(Handler.java:99) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.os.Looper.loop(Looper.java:123) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at android.app.ActivityThread.main(ActivityThread.java:4338) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at java.lang.reflect.Method.invokeNative(Native Method) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at java.lang.reflect.Method.invoke(Method.java:521) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 04-28 19:46:17.769: ERROR/AndroidRuntime(976): at dalvik.system.NativeStart.main(Native Method) 04-28 19:46:17.789: INFO/Process(52): Sending signal. PID: 976 SIG: 3 04-28 19:46:17.799: INFO/dalvikvm(976): threadid=7: reacting to signal 3 04-28 19:46:17.829: INFO/dalvikvm(976): Wrote stack trace to '/data/anr/traces.txt'

    Read the article

< Previous Page | 1 2 3  | Next Page >