Search Results

Search found 18 results on 1 pages for 'emile'.

Page 1/1 | 1 

  • A linked list with multiple heads in Java

    - by Emile
    Hi, I have a list in which I'd like to keep several head pointers. I've tried to create multiple ListIterators on the same list but this forbid me to add new elements in my list... (see Concurrent Modification exception). I could create my own class but I'd rather use a built-in implementation ;) To be more specific, here is an inefficient implementation of two basic operations and the one wich doesn't work : class MyList <E { private int[] _heads; private List<E _l; public MyList ( int nbHeads ) { _heads = new int[nbHeads]; _l = new LinkedList<E(); } public void add ( E e ) { _l.add(e); } public E next ( int head ) { return _l.get(_heads[head++]); // ugly } } class MyList <E { private Vector<ListIterator<E _iters; private List<E _l; public MyList ( int nbHeads ) { _iters = new Vector<ListIterator<E(nbHeads); _l = new LinkedList<E(); for( ListIterator<E iter : _iters ) iter = _l.listIterator(); } public void add ( E e ) { _l.add(e); } public E next ( int head ) { // ConcurrentModificationException because of the add() return _iters.get(head).next(); } } Emile

    Read the article

  • What user-friendly term should I use for a view that lives under a tab in a tab bar app?

    - by Emile Cormier
    My app uses a tab bar controller. In the user documentation, I'm not sure what name to use for a view that lives under a tab. For example, the app has a Settings tab. In the user documentation, I have a sentence that goes something like this: This threshold can be adjusted in the Settings tab. "Settings tab" is not terribly user-friendly. What would be a better term than "tab"? I've looked though Apple's Human Interface Guideline, but I can't find what would be the official user-friendly term for "view that lives under a tab".

    Read the article

  • Recover files from corrupt filesystem

    - by Emile 81
    My situation: I have an older 80GB IDE internal hdd, with a few files on that I would like very much to recover: some word documents some latex documents (text files) and pictures (png, jpg, eps files) some other text documents and visual studio project files I had backed them (not the latex ones though) up using svn, but have not committed lately, and would loose a lot of work if I cant recover. the hdd seems to have lost its filesystem, i have no idea how it came about. I know it has/had 3 NTFS partitions, i know the files i want are on the second or third partition. I read http://superuser.com/questions/81877/recover-hard-disk-data Partition Find and Mount did not see all the partitions using intelligent scan TestDisk does (i think), I followed the step by step instructions here, but when I try to list the files it says: "Can't open filesystem, filesystem seems damaged." I'm not sure how to proceed here, as TestDisks wiki does not contain this error message afaik. I don't know if the hdd is gonna fail, or some prog has caused the filesystem to be corrupt, the hdd doesnt make a sound, so i guess that's good. I would like some guidance so I don't accidentally cause more damage. (eg. is it ok to let testdisk write the filesystem to disk? I'm pretty the partitions are listed ok, but not 100%)

    Read the article

  • AWS Large Instance: /mnt does not show all the space that should be available

    - by Emile Baizel
    I just created a Large (m1.large) 64 bit instance which comes with 850 GB instance storage. Look at the Large Instance http://aws.amazon.com/ec2/instance-types/ A 'df -h' from the root folder gives me the output below. The /mnt is where I'm thinking the instance storage is but here it is only showing me 414G. I have set up two servers and both are showing the same numbers. root@ip-11-11-11-11:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 7.9G 1.1G 6.5G 14% / none 3.7G 112K 3.7G 1% /dev none 3.7G 0 3.7G 0% /dev/shm none 3.7G 48K 3.7G 1% /var/run none 3.7G 0 3.7G 0% /var/lock /dev/sdb 414G 199M 393G 1% /mnt

    Read the article

  • Resolve a many-SSL-to-one IP for clients browsers that doesn't support SNI

    - by Emile
    Whoa, acronyms :) So according to this question you can have multiple SSL subdomains on one IP address as long as your server supports TLS (which Apache 2.2x does). Another answer to that question points out that the client browser must have SNI support to work, which IE doesn't have on Windows XP. So, what happens to people with that browser is a warning message saying that the SSL cert doesn't match the domain. Can one resolve this issue for those client browsers without SNI support? Does a wildcard (for subdomains) do the trick? Are there other (cheaper) options?

    Read the article

  • Http to https behavior for visits from Internet Explorer client

    - by Emile
    My website has an SSL cert (example url: https://subdomain.example.com). Under Apache it's set up for both port 80 and port 443. So under the following configuration, anyone who goes to http://subdomain.example.com is sent to https://subdomain.example.com . But for visits from Internet Explorer, the redirect doesn't happen. Instead, http visits get a "Internet Explorer cannot display the web page." with a list of client-side solutions to try. Any ideas on how to fix the config so IE visits have the same behavior as the other browsers (that is, send http to https automatically)? NameVirtualHost *:443 <VirtualHost *:80> DocumentRoot /var/www/somewebroot ServerName subdomain.example.com </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/somewebroot ServerName subdomain.example.com # SSL CERTS HERE </VirtualHost> *Tested IE8, IE9 beta

    Read the article

  • Can't remove Internet Explorer Add-On

    - by Emile
    I'm using IE8 on Windows 7. I'm trying to delete an add-on from my "Manage Add-ons" panel. But when I double click the add-on I'd like to delete, the "Remove" button is grayed out. Only the disable option is available. I've gone to the path it points to and deleted that folder. I've also searched the registry to delete keys and went to Control Panel to uninstall the related installation package. Any ideas?

    Read the article

  • Why does my computer sometimes not identify my wireless network, or others, that it always connects to?

    - by Emile Erasmus
    I have a vista operating system. Sometimes my computer will not connect to the wireless network (internet) when I start up my laptop. This happens at different places on occasion, and it is very random. It tries to connect, but can not identify the network (it does recognize the wifi name). So at the end it connects, but with limited connectivity. It can not be the hardware because all other computers connect to it fine at the same time. And it happens at different places, mostly home, but sometimes at coffee shops, etc. And then in a day or two when I start up my laptop it is all of a sudden working again. (restart does not solve the problem). I have tried all the trouble shooting options windows offers, restarting the notebook, switch modem on and off, switch laptop wifi on and of, deleted the wifi memory from the laptop and reconnected with the password as if it was the first time, everything. If it does not work at one place it does not mean it won't work at another. Example it won't work at home, then I go to coffee shop and it works, then get back home and it don't. Anyone encountered this before?

    Read the article

  • Recover files from corrupt filesystem

    - by Emile 81
    My situation: I have an older 80GB IDE internal hdd, with a few files on that I would like very much to recover: some word documents some latex documents (text files) and pictures (png, jpg, eps files) some other text documents and visual studio project files I had backed them (not the latex ones though) up using svn, but have not committed lately, and would loose a lot of work if I cant recover. the hdd seems to have lost its filesystem, i have no idea how it came about. I know it has/had 3 NTFS partitions, i know the files i want are on the second or third partition. I read http://superuser.com/questions/81877/recover-hard-disk-data Partition Find and Mount did not see all the partitions using intelligent scan TestDisk does (i think), I followed the step by step instructions here, but when I try to list the files it says: "Can't open filesystem, filesystem seems damaged." I'm not sure how to proceed here, as TestDisks wiki does not contain this error message afaik. I don't know if the hdd is gonna fail, or some prog has caused the filesystem to be corrupt, the hdd doesnt make a sound, so i guess that's good. I would like some guidance so I don't accidentally cause more damage. (eg. is it ok to let testdisk write the filesystem to disk? I'm pretty the partitions are listed ok, but not 100%)

    Read the article

  • Django: Prefill a ManytoManyField

    - by Emile Petrone
    I have a ManyToManyField on a settings page that isn't rendering. The data was filled when the user registered, and I am trying to prefill that data when the user tries to change it. Thanks in advance for the help! The HTML: {{form.types.label}} {% if add %} {{form.types}} {% else %} {% for type in form.types.all %} {{type.description}} {% endfor %} {% endif %} The View: @csrf_protect @login_required def edit_host(request, host_id, template_name="host/newhost.html"): host = get_object_or_404(Host, id=host_id) if request.user != host.user: return HttpResponseForbidden() form = HostForm(request.POST) if form.is_valid(): if request.method == 'POST': if form.cleaned_data.get('about') is not None: host.about = form.cleaned_data.get('about') if form.cleaned_data.get('types') is not None: host.types = form.cleaned_data.get('types') host.save() form.save_m2m() return HttpResponseRedirect('/users/%d/' % host.user.id) else: form = HostForm(initial={ "about":host.about, "types":host.types, }) data = { "host":host, "form":form } return render_to_response(template_name, data, context_instance=RequestContext(request)) Form: class HostForm(forms.ModelForm): class Meta: model = Host fields = ('types', 'about', ) types = forms.ModelMultipleChoiceField( widget=forms.CheckboxSelectMultiple, queryset=Type.objects.all(), required=True) about = forms.CharField( widget=forms.Textarea(), required=True) def __init__(self, *args, **kwargs): super(HostForm, self).__init__(*args, **kwargs) self.fields['about'].widget.attrs = { 'placeholder':'Hello!'}

    Read the article

  • Getting-started: Setup Database for Node.js

    - by Emile Petrone
    I am new to node.js but am excited to try it out. I am using Express as a web framework, and Jade as a template engine. Both were easy to get setup following this tutorial from Node Camp. However the one problem I am finding is I can't find a simple tutorial for getting a DB set up. I am trying to build a basic chat application (store session and message). Does anyone know of a good tutorial? This other SO post talks about dbs to use- but as this is very different from the Django/MySQL world I've been in, I want to make sure I understand what is going on. Thanks!

    Read the article

  • Grouping timestamps by interval between timestamps, then calculating from group MySQL

    - by Emile
    To put this question into context, I'm trying to calculate "time in app" based on an event log. Assume the following table: user_id event_time 2 2012-05-09 07:03:38 3 2012-05-09 07:03:42 4 2012-05-09 07:03:43 2 2012-05-09 07:03:44 2 2012-05-09 07:03:45 4 2012-05-09 07:03:52 2 2012-05-09 07:06:30 I'd like to get the difference between the highest and lowest event_time from a set of timestamps that are within 2 minutes of eachother (and grouped by user). If a timestamp is outside of a 2 minute interval from the set, it should be considered a part of another set. Desired output: user_id seconds_interval 2 7 (because 07:03:45 - 07:03:38 is 7 seconds) 3 0 (because 07:03:42) 4 9 (because 07:03:52 - 2012-05-09 07:03:43) 2 0 (because 07:06:30 is outside 2 min interval of 1st user_id=2 set) This is what I've tried, although I can't group on seconds_interval (even if I could, I'm not sure this is the right direction): SELECT (max(tr.event_time)-min(tr.event_time)) as seconds_interval FROM some_table tr INNER JOIN TrackingRaw tr2 ON (tr.event_time BETWEEN tr2.event_time - INTERVAL 2 MINUTE AND tr2.event_time + INTERVAL 2 MINUTE) GROUP BY seconds_interval

    Read the article

  • Registry corrupted for testing?

    - by Emile
    Hi. Forgive my ignorance. I'm a lowly LAMP stack developer and this is my first post for "c++". We had an Internet Explorer add-on commissioned but then lost support. Allegedly each version has to be have been tested "on a fresh computer since old add-ons could have cause registry errors." I'm not familiar with IE add-on development (or c++ dev). Is this common? Can't one simply reverse registry errors? How to continue testing iterations on one machine? Thanks!

    Read the article

  • In C++, what is the scope resolution ("order of precedence") for shadowed variable names?

    - by Emile Cormier
    In C++, what is the scope resolution ("order of precedence") for shadowed variable names? I can't seem to find a concise answer online. For example: #include <iostream> int shadowed = 1; struct Foo { Foo() : shadowed(2) {} void bar(int shadowed = 3) { std::cout << shadowed << std::endl; // What does this output? { int shadowed = 4; std::cout << shadowed << std::endl; // What does this output? } } int shadowed; }; int main() { Foo().bar(); } I can't think of any other scopes where a variable might conflict. Please let me know if I missed one. What is the order of priority for all four shadow variables when inside the bar member function?

    Read the article

  • Is it good practice to generally make heavyweight classes non-copyable?

    - by Emile Cormier
    I have a Shape class containing potentially many vertices, and I was contemplating making copy-constructor/copy-assignment private to prevent accidental needless copying of my heavyweight class (for example, passing by value instead of by reference). To make a copy of Shape, one would have to deliberately call a "clone" or "duplicate" method. Is this good practice? I wonder why STL containers don't use this approach, as I rarely want to pass them by value.

    Read the article

  • In C++, what is the "order of precedence" for shadowed variable names?

    - by Emile Cormier
    In C++, what is the "order of precedence" for shadowed variable names? I can't seem to find a concise answer online. For example: #include <iostream> int shadowed = 1; struct Foo { Foo() : shadowed(2) {} void bar(int shadowed = 3) { std::cout << shadowed << std::endl; // What does this output? } int shadowed; }; int main() { Foo().bar(); } I can't think of any other scopes where a variable might conflict. Please let me know if I missed one.

    Read the article

  • Generate a form from an untyped mvc 2 model or dictionary

    - by user329251
    HI all, I am looking for a way to generate and validate mvc 2 forms using untyped entities. Basically similar how the propertygrid in winforms behaves. In the utmost basic sample for instance have an dictionary and generate a form from that depending on the datatype in the Dictionary ofcourse it should be able to fill the same dictionary in the controller. Any ideas or leads or hints? Best regards, Emile

    Read the article

1