Search Results

Search found 2521 results on 101 pages for 'typed constants'.

Page 22/101 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Future Of F# At Jazoon 2011

    - by Alois Kraus
    I was at the Jazoon 2011 in Zurich (Switzerland). It was a really cool event and it had many top notch speaker not only from the Microsoft universe. One of the most interesting talks was from Don Syme with the title: F# Today/F# Tomorrow. He did show how to use F# scripting to browse through open databases/, OData Web Services, Sharepoint, …interactively. It looked really easy with the help of F# Type Providers which is the next big language feature in a future F# version. The object returned by a Type Provider is used to access the data like in usual strongly typed object model. No guessing how the property of an object is called. Intellisense will show it just as you expect. There exists a range of Type Providers for various data sources where the schema of the stored data can somehow be dynamically extracted. Lets use e.g. a free database it would be then let data = DbProvider(http://.....); data the object which contains all data from e.g. a chemical database. It has an elements collection which contains an element which has the properties: Name, AtomicMass, Picture, …. You can browse the object returned by the Type Provider with full Intellisense because the returned object is strongly typed which makes this happen. The same can be achieved of course with code generators that use an input the schema of the input data (OData Web Service, database, Sharepoint, JSON serialized data, …) and spit out the necessary strongly typed objects as an assembly. This does work but has the downside that if the schema of your data source is huge you will quickly run against a wall with traditional code generators since the generated “deserialization” assembly could easily become several hundred MB. *** The following part contains guessing how this exactly work by asking Don two questions **** Q: Can I use Type Providers within C#? D: No. Q: F# is after all a library. I can reference the F# assemblies and use the contained Type Providers? D: F# does annotate the generated types in a special way at runtime which is not a static type that C# could use. The F# type providers seem to use a hybrid approach. At compilation time the Type Provider is instantiated with the url of your input data. The obtained schema information is used by the compiler to generate static types as usual but only for a small subset (the top level classes up to certain nesting level would make sense to me). To make this work you need to access the actual data source at compile time which could be a problem if you want to keep the actual url in a config file. Ok so this explains why it does work at all. But in the demo we did see full intellisense support down to the deepest object level. It looks like if you navigate deeper into the object hierarchy the type provider is instantiated in the background and attach to a true static type the properties determined at run time while you were typing. So this type is not really static at all. It is static if you define as a static type that its properties shows up in intellisense. But since this type information is determined while you are typing and it is not used to generate a true static type and you cannot use these “intellistatic” types from C#. Nonetheless this is a very cool language feature. With the plotting libraries you can generate expressive charts from any datasource within seconds to get quickly an overview of any structured data storage. My favorite programming language C# will not get such features in the near future there is hope. If you restrict yourself to OData sources you can use LINQPad to query any OData enabled data source with LINQ with ease. There you can query Stackoverflow with The output is also nicely rendered which makes it a very good tool to explore OData sources today.

    Read the article

  • ASP.NET MVC model binding with nested child models and PartialViews

    - by MartinHN
    I have a model called Page, which has a property called Content of type EditableContent. EditableContent have SidebarLeft and SidebarRight (type TemplateSection). I want to edit the Page instance, in my Edit.aspx view. Because EditableContent is also attached to other models, I have a PartialView called ContentEditor.ascx that is strongly typed and takes an instance of EditableContent and renders it. The rendering part all works fine, but when I post - everything inside my ContentEditor is not binded - which means that Page.Content is null. On the PartialView, I use the strongly typed Html Helpers to do this: <%= Html.HiddenFor(m => m.TemplateId) %> And so on. But because the input elements on the form, rendered by ContentEditor.ascx, does not get the "Content" prefix to its id attribute - the values are not binded to Page. So to overcome this, I've definitely done the wrong thing. Used loosely typed Html Helpers instead: <%= Html.Hidden("Content.TemplateId", Model.TemplateId) %> And when I'm dealing with a property that is a List of something it gets very ugly. I then have to render collection indexes manually... doh What am I missing here? A BindPrefix in the controller action that the Form is being posted to? Should I put both Page and EditableContent as parameters to the controller action: public ActionResult Edit(Page page, EditableContent content) { ... } Any help is much appreciated!

    Read the article

  • Advice welcomed on creating my own Swing component

    - by Toto
    Recently I asked which was the best Swing component to bind to a BigDecimal variable (with some particular editing properties). It turns out that none of the standard Swing components suit me completely, nor did the third-party Swing component libraries I've found out there. So I’ve decided to create my own Swing component. Component description: I want to extend JTextField or JFormattedTextField, so my new component can be easily bound to a BigDecimal variable. The component will have customizable scale and length properties. Behavior: When the component is drawn, it shows only the decimal point and space for scale digits to its right. When the component receives focus the caret should be positioned left to the decimal point. As the user types numbers (any other character is ignored) they appear to the left of the caret, only length – scale numbers are accepted, any other number typed is ignored as the integer portion is full. Any time the user types the decimal point the caret moves to the right side of the decimal point. The following numbers typed are shown in the decimal part, only scale numbers are considered any other number typed is ignored as the decimal portion is full. Additionally, thousand separators should appear as the user types numbers left to the decimal point. Invoking a getValue() method on the component should yield the BigDecimal representing the number just entered. I’ve never created my own Swing component; I’ve barely used the standard ones. So I would appreciate any good tutorial/info/tip on creating the component described. This is the only thing I've got so far. Thanks in advance.

    Read the article

  • Generic object to object mapping with parametrized constructor

    - by Rody van Sambeek
    I have a data access layer which returns an IDataRecord. I have a WCF service that serves DataContracts (dto's). These DataContracts are initiated by a parametrized constructor containing the IDataRecord as follows: [DataContract] public class DataContractItem { [DataMember] public int ID; [DataMember] public string Title; public DataContractItem(IDataRecord record) { this.ID = Convert.ToInt32(record["ID"]); this.Title = record["title"].ToString(); } } Unfortanately I can't change the DAL, so I'm obliged to work with the IDataRecord as input. But in generat this works very well. The mappings are pretty simple most of the time, sometimes they are a bit more complex, but no rocket science. However, now I'd like to be able to use generics to instantiate the different DataContracts to simplify the WCF service methods. I want to be able to do something like: public T DoSomething<T>(IDataRecord record) { ... return new T(record); } So I'd tried to following solutions: Use a generic typed interface with a constructor. doesn't work: ofcourse we can't define a constructor in an interface Use a static method to instantiate the DataContract and create a typed interface containing this static method. doesn't work: ofcourse we can't define a static method in an interface Use a generic typed interface containing the new() constraint doesn't work: new() constraint cannot contain a parameter (the IDataRecord) Using a factory object to perform the mapping based on the DataContract Type. does work, but: not very clean, because I now have a switch statement with all mappings in one file. I can't find a real clean solution for this. Can somebody shed a light on this for me? The project is too small for any complex mapping techniques and too large for a "switch-based" factory implementation.

    Read the article

  • How to make a WPF ComboBox editable with custom values

    - by Liam
    I would like to have a combobox that allows selection from a list of values and also allow a custom value from the typed in text. For display reasons the items are a complex type (lets say the combobox item template displays a patch of color and a flag indicating if it is a custom color). public class ColorLevel { public decimal Intensity { get; set; } public bool IsCustom { get; set; } public Color BaseColor { get; set; } public override ToString() { return string.Format("{0}", Intensity*100); } } Example items var items = new [] { new ColorLevel { Intensity = 0.9m, IsCustom = false, BaseColor = Color.Red }, new ColorLevel { Intensity = 0.7m, IsCustom = false, BaseColor = Color.Red } } XAML <ComboBox SelectedItem="{Binding Path=SelectedColorLevel}" IsEditable="true" IsTextSearchEnabled="true"> </ComboBox> So the above markup works when an item is selected from the item list. And as you type with the text search the matching items are selected. If the typed text doesn't match an item then the SelectedColorLevel is set to null. The question is at what point (and how) is it best to create a new custom item that can be set to the SelectedColorLevel when the typed text doesn't match an item. For example I would want to assign a new item to the selected value such as new ColorLevel { Intensity = decimal.Parse(textvalue), IsCustom = true } or using an appropriate converter and databinding to the Text property.

    Read the article

  • How to handle update events on a ASP.NET GridView?

    - by Bogdan M
    Hello, This may sound silly, but I need to find out how to handle an Update event from a GridView. First of all, I have a DataSet, where there is a typed DataTable with a typed TableAdapter, based on a "select all query", with auto-generated Insert, Update, and Delete methods. Then, in my aspx page, I have an ObjectDataSource related to my typed TableAdapter on Select, Insert, Update and Delete methods. Finnally, I have a GridView bound to this ObjectDataSource, with default Edit, Update and Cancel links. How should I implement the edit functionality? Should I have something like this? protected void GridView_RowEditing(object sender, GridViewEditEventArgs e) { using(MyTableAdapter ta = new MyTableAdapter()) { ta.Update(...); TypedDataTable dt = ta.GetRecords(); this.GridView.DataSource = dt; this.GridView.DataBind(); } } In this scenario, I have the feeling that I update some changes to the DB, then I retrive and bind all the data, and not only the modified parts. Is there any way to update only the DataSet, and this to update on his turn the DataBase and the GridView? I do not want to retrive all the data after a CRUD operations is performed, I just want to retrive the changes made. Thanks. PS: I'm using .NET 3.5 and VS 2008 with SP1.

    Read the article

  • ASP.NET MVC Form repopulation

    - by ListenToRick
    I have a controller with two actions: [AcceptVerbs("GET")] public ActionResult Add() { PrepareViewDataForAddAction(); return View(); } [AcceptVerbs("POST")] public ActionResult Add([GigBinderAttribute]Gig gig, FormCollection formCollection) { if (ViewData.ModelState.IsValid) { GigManager.Save(gig); return RedirectToAction("Index", gig.ID); } PrepareViewDataForAddAction(); return View(gig); } As you can see, when the form posts its data, the Add action uses a GigBinder (An implemenation of IModelBinder) In this binder I have: if (int.TryParse(bindingContext.HttpContext.Request.Form["StartDate.Hour"], out hour)) { gig.StartDate.Hour = hour; } else { bindingContext.ModelState.AddModelError("Doors", "You need to tell us when the doors open"); } The form contains a text box with id "StartDate.Hour". As you can see above, the GigBinder tests to see that the user has typed in an integer into the textbox with id "StartDate.Hour". If not, a model error is added to the modelstate using AddModelError. Since the gigs property gigs.StartDate.Hour is strongly typed, I cannot set its value to, for example, "TEST" if the user has typed this into the forms textbox. Hence, I cant set the value of gigs.StartDate.Hour since the user has entered a string rather than an integer. Since the Add Action returns the view and passes the model (return View(gig);) if the modelstate is invalid, when the form is re-displayed with validation mssages, the value "TEST" is not displayed in the textbox. Instead, it will be the default value of gig.StartDate.Hour. How do I get round this problem? I really stuck!

    Read the article

  • Localization of DisplayNameAttribute

    - by PowerKiKi
    Hi, I am looking for a way to localize properties names displayed in a PropertyGrid. The property's name may be "overriden" using the DisplayNameAttribute attribute. Unfortunately attributes can not have non constant expressions. So I can not use strongly typed resources such as: class Foo { [DisplayAttribute(Resources.MyPropertyNameLocalized)] // do not compile string MyProperty {get; set;} } I had a look around and found some suggestion to inherit from DisplayNameAttribute to be able to use resource. I would end up up with code like: class Foo { [MyLocalizedDisplayAttribute("MyPropertyNameLocalized")] // not strongly typed string MyProperty {get; set;} } However I lose strongly typed resource benefits which is definitely not a good thing. Then I came across DisplayNameResourceAttribute which may be what I'm looking for. But it's supposed to be in Microsoft.VisualStudio.Modeling.Design namespace and I can't find what reference I am supposed to add for this namespace. Anybody know if there's a easier way to achieve DisplayName localization in a good way ? or if there is as way to use what Microsoft seems to be using for Visual Studio ?

    Read the article

  • What is PHP like as a programming language?

    - by seanlinmt
    I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise). What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically typed language so attractive? Or, does the popularity of PHP have more to do with it being free? Okay, I think I better give a little more background to get more meaningful answers, because I am not wanting a flame war. I come from a C background, and when I moved into C# and Visual Studio. Having code completion, integration with an SQL database, huge existing class libraries and easy to access documentation, as well as new tools such as LINQ and ReSharper was like heaven. I didn't enjoy JavaScript before JQuery, but now I love it as well. Recently, I ported a PHP project over to C# and I used Zend to help me debug and understand more while porting - instead of maintaining two code streams. That also cut down on the cost of the server and maintenance. Getting into PHP would be nice. I think that Visual Studio has spoiled me - but again Eclipse is also equally spoiling. It would be nice to have an answer from someone who has experience developing both under PHP and .NET.

    Read the article

  • T-SQL in SQL Azure

    - by kaleidoscope
    The following table summarizes the Transact-SQL support provided by SQL Azure Database at PDC 2009: Transact-SQL Features Supported Transact-SQL Features Unsupported Constants Constraints Cursors Index management and rebuilding indexes Local temporary tables Reserved keywords Stored procedures Statistics management Transactions Triggers Tables, joins, and table variables Transact-SQL language elements such as Create/drop databases Create/alter/drop tables Create/alter/drop users and logins User-defined functions Views, including sys.synonyms view Common Language Runtime (CLR) Database file placement Database mirroring Distributed queries Distributed transactions Filegroup management Global temporary tables Spatial data and indexes SQL Server configuration options SQL Server Service Broker System tables Trace Flags   Amit, S

    Read the article

  • On Teaching Open Source Development

    <b>IT World:</b> "One of the constants in my interactions with the Linux and open source communities is that they--all of them--are out there, in the big wide world, while I remain ensconced in my fortress of solitude here in Northern Indiana."

    Read the article

  • Unit-testing code that relies on untestable 3rd party code

    - by DudeOnRock
    Sometimes, especially when working with third party code, I write unit-test specific code in my production code. This happens when third party code uses singletons, relies on constants, accesses the file-system/a resource I don't want to access in a test situation, or overuses inheritance. The form my unit-test specific code takes is usually the following: if (accessing or importing a certain resource fails) I assume this is a test case and load a mock object Is this poor form, and if it is, what is normally done when writing tests for code that uses untestable third party code?

    Read the article

  • Is return-type-(only)-polymorphism in Haskell a good thing?

    - by dainichi
    One thing that I've never quite come to terms with in Haskell is how you can have polymorphic constants and functions whose return type cannot be determined by their input type, like class Foo a where foo::Int -> a Some of the reasons that I do not like this: Referential transparency: "In Haskell, given the same input, a function will always return the same output", but is that really true? read "3" return 3 when used in an Int context, but throws an error when used in a, say, (Int,Int) context. Yes, you can argue that read is also taking a type parameter, but the implicitness of the type parameter makes it lose some of its beauty in my opinion. Monomorphism restriction: One of the most annoying things about Haskell. Correct me if I'm wrong, but the whole reason for the MR is that computation that looks shared might not be because the type parameter is implicit. Type defaulting: Again one of the most annoying things about Haskell. Happens e.g. if you pass the result of functions polymorphic in their output to functions polymorphic in their input. Again, correct me if I'm wrong, but this would not be necessary without functions whose return type cannot be determined by their input type (and polymorphic constants). So my question is (running the risk of being stamped as a "discussion quesion"): Would it be possible to create a Haskell-like language where the type checker disallows these kinds of definitions? If so, what would be the benefits/disadvantages of that restriction? I can see some immediate problems: If, say, 2 only had the type Integer, 2/3 wouldn't type check anymore with the current definition of /. But in this case, I think type classes with functional dependencies could come to the rescue (yes, I know that this is an extension). Furthermore, I think it is a lot more intuitive to have functions that can take different input types, than to have functions that are restricted in their input types, but we just pass polymorphic values to them. The typing of values like [] and Nothing seems to me like a tougher nut to crack. I haven't thought of a good way to handle them. I doubt I am the first person to have had thoughts like these. Does anybody have links to good discussions about this Haskell design decision and the pros/cons of it?

    Read the article

  • Who could ask for more with LESS CSS? (Part 2 of 3&ndash;Setup)

    - by ToStringTheory
    Welcome to part two in my series covering the LESS CSS language.  In the first post, I covered the two major CSS precompiled languages - LESS and SASS to a small extent, iterating over some of the features that you could expect to find in them.  In this post, I will go a little further in depth into the setup and execution of using the LESS framework. Introduction It really doesn’t take too much to get LESS working in your project.  The basic workflow will be including the necessary translator in your project, defining bundles for the LESS files, add the necessary code to your layouts.cshtml file, and finally add in all your necessary styles to the LESS files!  Lets get started… New Project Just like all great experiments in Visual Studio, start up a File > New Project, and create a new MVC 4 Web Application.  The Base Package After you have the new project spun up, use the Nuget Package Manager to install the Bundle Transformer: LESS package. This will take care of installing the main translator that we will be using for LESS code (dotless which is another Nuget package), as well as the core framework for the Bundle Transformer library.  The installation will come up with some instructions in a readme file on how to modify your web.config to handle all your *.less requests through the Bundle Transformer, which passes the translating onto dotless. Where To Put These LESS Files?! This step isn’t really a requirement, however I find that I don’t like how ASP.Net MVC just has a content directory where they store CSS, content images, css images….  In my project, I went ahead and created a new directory just for styles – LESS files, CSS files, and images that are only referenced in LESS or CSS.  Ignore the MVC directory as this was my testbed for another project I was working on at the same time.  As you can see here, I have: A top level directory for images which contains only images used in a page A top level directory for scripts A top level directory for Styles A few directories for plugins I am using (Colrizr, JQueryUI, Farbtastic) Multiple *.less files for different functions (I’ll go over these in a minute) I find that this layout offers the best separation of content types.  Bring Out Your Bundles! The next thing that we need to do is add in the necessary code for the bundling of these LESS files.  Go ahead and open your BundleConfig.cs file, usually located in the /App_Start/ folder of the project.  As you will see in a minute, instead of using the method Microsoft does in the base MVC 4 project, I change things up a bit.  Define Constants The first thing I do is define constants for each of the virtual paths that will be used in the bundler: The main reason is that I hate magic strings in my program, so the fact that you first defined a virtual path in the BundleConfig file, and then used that path in the _Layout.cshtml file really irked me. Add Bundles to the BundleCollection Next, I am going to define the bundles for my styles in my AddStyleBundles method: That is all it takes to get all of my styles in play with LESS.  The CssTransformer and NullOrderer types come from the Bundle Transformer we grabbed earlier.  If we didn’t use that package, we would have to write our own function (not too hard, but why do it if it’s been done). I use the site.less file as my main hub for LESS - I will cover that more in the next section. Add Bundles To Layout.cshtml File With the constants in the BundleConfig file, instead of having to use the same magic string I defined for the bundle virtual path, I am able to do this: Notice here that besides the RenderSection magic strings (something I am working on in another side project), all of the bundles are now based on const strings.  If I need to change the virtual path, I only have to do it in one place.  Nifty! Get Started! We are now ready to roll!  As I said in the previous section, I use the site.less file as a central hub for my styles: As seen here, I have a reset.css file which is a simple CSS reset.  Next, I have created a file for managing all my color variables – colors.less: Here, you can see some of the standards I started to use, in this case for color variables.  I define all color variables with the @col prefix.  Currently, I am going for verbose variable names. The next file imported is my font.less file that defines the typeface information for the site: Simple enough.  A couple of imports for fonts from Google, and then declaring variables for use throughout LESS.  I also set up the heading sizes, margins, etc..  You can also see my current standardization for font declaration strings – @font. Next, I pull in a mixins.less file that I grabbed from the Twitter Bootstrap library that gives some useful parameterized mixins for use such as border-radius, gradient, box-shadow, etc… The common.less file is a file that just contains items that I will be defining that can be used across all my LESS files.  Kind of like my own mixins or font-helpers: Finally I have my layout.less file that contains all of my definitions for general site layout – width, main/sidebar widths, footer layout, etc: That’s it!  For the rest of my one off definitions/corrections, I am currently putting them into the site.less file beneath my original imports Note Probably my favorite side effect of using the LESS handler/translator while bundling is that it also does a CSS checkup when rendering…  See, when your web.config is set to debug, bundling will output the url to the direct less file, not the bundle, and the http handler intercepts the call, compiles the less, and returns the result.  If there is an error in your LESS code, the CSS file can be returned empty, or may have the error output as a comment on the first couple lines. If you have the web.config set to not debug, then if there is an error in your code, you will end up with the usual ASP.Net exception page (unless you catch the exception of course), with information regarding the failure of the conversion, such as brace mismatch, undefined variable, etc…  I find it nifty. Conclusion This is really just the beginning.  LESS is very powerful and exciting!  My next post will show an actual working example of why LESS is so powerful with its functions and variables…  At least I hope it will!  As for now, if you have any questions, comments, or suggestions on my current practice, I would love to hear them!  Feel free to drop a comment or shoot me an email using the contact page.  In the mean time, I plan on posting the final post in this series tomorrow or the day after, with my side project, as well as a whole base ASP.Net MVC4 templated project with LESS added in it so that you can check out the layout I have in this post.  Until next time…

    Read the article

  • DirectX 11 Constant Buffers vs Effect Framework

    - by Alex
    I'm having some trouble understanding the differences between using constant buffers or using the effect framework of DirectX11 for updating shader constants. From what I understand they both do exactly the same thing, although from reading the documentation it appears as if using effects is meant to be 'easier'. However they seem the same to me, one uses VSSetConstantBuffers and the other GetConstantBufferByName. Is there something I'm missing here?

    Read the article

  • More elegant way to avoid hard coding the format of a a CSV file?

    - by dsollen
    I know this is trivial issue, but I just feel this can be more elegant. So I need to write/read data files for my program, lets say they are CSV for now. I can implement the format as I see fit, but I may have need to change that format later. The simply thing to do is something like out.write(For.getValue()+","+bar.getMinValue()+","+fi.toString()); This is easy to write, but obviously is guilty of hard coding and the general 'magic number' issue. The format is hard-coded, requires parsing of the code to figure out the file format, and changing the format requires changing multiple methods. I could instead have my constants specifying the location that I want each variable to be saved in the CSV file to remove some of the 'magic numbers'; then save/load into the an array at the location specified by the constants: int FOO_LOCATION=0; int BAR_MIN_VAL_LOCATION=1; int FI_LOCATION=2 int NUM_ARGUMENTS=3; String[] outputArguments=new String[NUM_ARGUMENTS]; outputArguments[FOO_LOCATION] = foo.getValue(); outputArgumetns[BAR_MIN_VAL_LOCATION] = bar.getMinValue(); outptArguments[FI_LOCATOIN==fi.toString(); writeAsCSV(outputArguments); But this is...extremely verbose and still a bit ugly. It makes it easy to see the format of existing CSV and to swap the location of variables within the file easily. However, if I decide to add an extra value to the csv I need to not only add a new constant, but also modify the read and write methods to add the logic that actually saves/reads the argument from the array; I still have to hunt down every method using these variables and change them by hand! If I use Java enums I can clean this up slightly, but the real issue is still present. Short of some sort of functional programming (and java's inner classes are too ugly to be considered functional) I still have no obvious way of clearly expressing what variable is associated with each constant short of writing (and maintaining) it in the read/write methods. For instance I still need to write somewhere that the FOO_LOCATION specifies the location of foo.getValue(). It seems as if there should be a prettier, easier to maintain, manner for approaching this? Incidentally, I'm working in java at the moment, however, I am interested conceptually about the design approach regardless of language. Some library in java that does all the work for me is definitely welcome (though it may prove more hassle to get permission to add it to the codebase then to just write something by hand quickly), but what I'm really asking is more about how to write elegant code if you had to do this by hand.

    Read the article

  • Squid external_acl_type Cannot run process

    - by Alex Rezistorman
    I want to restrict uploading for group of the users via squid. So I've choosen to use external_acl_type but after reload of the squid it returns error. WARNING: Cannot run '/usr/local/etc/squid/lists/newupload.sh' process. Permissions of newupload.sh and squid are the same. newupload.sh is executive. How can I solve this problem? Thnx in advance. newupload.sh #!/bin/sh while read line; do set -- $line length=$1 limit=$2 if [ -z "$length" ] || [ "$length" -le "$2" ]; then echo OK else echo ERR fi done Strings from squid.conf external_acl_type request_body protocol=2.5 %{Content-Lenght} /usr/local/etc/squid/lists/newupload.sh acl request_max_size external request_body 5000 http_access allow users request_max_size Squid version squid -v Squid Cache: Version 3.2.13 configure options: '--with-default-user=squid' '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin' '--datadir=/usr/local/etc/squid' '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/var' '--sysconfdir=/usr/local/etc/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid/squid.pid' '--with-swapdir=/var/squid/cache/squid' '--enable-auth' '--enable-build-info' '--enable-loadable-modules' '--enable-removal-policies=lru heap' '--disable-epoll' '--disable-linux-netfilter' '--disable-linux-tproxy' '--disable-translation' '--enable-auth-basic=PAM' '--disable-auth-digest' '--enable-external-acl-helpers= kerberos_ldap_group' '--enable-auth-negotiate=kerberos' '--disable-auth-ntlm' '--without-pthreads' '--enable-storeio=diskd ufs' '--enable-disk-io=AIO Blocking DiskDaemon IpcIo Mmapped' '--enable-log-daemon-helpers=file' '--disable-url-rewrite-helpers' '--disable-ipv6' '--disable-snmp' '--disable-htcp' '--disable-forw-via-db' '--disable-cache-digests' '--disable-wccp' '--disable-wccpv2' '--disable-ident-lookups' '--disable-eui' '--disable-ipfw-transparent' '--disable-pf-transparent' '--disable-ipf-transparent' '--disable-follow-x-forwarded-for' '--disable-ecap' '--disable-icap-client' '--disable-esi' '--enable-kqueue' '--with-large-files' '--enable-cachemgr-hostname=proxy.adir.vbr.ua' '--with-filedescriptors=131072' '--disable-auto-locale' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd8.3' 'build_alias=amd64-portbld-freebsd8.3' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -frename-registers -fweb -fforce-addr -fmerge-all-constants -maccumulate-outgoing-args -pipe -march=core2 -I/usr/local/include -DLDAP_DEPRECATED' 'LDFLAGS= -L/usr/local/lib' 'CPPFLAGS=-I/usr/local/include' 'CXX=c++' 'CXXFLAGS=-O2 -fno-strict-aliasing -frename-registers -fweb -fforce-addr -fmerge-all-constants -maccumulate-outgoing-args -pipe -march=core2 -I/usr/local/include -DLDAP_DEPRECATED' 'CPP=cpp' --enable-ltdl-convenience Related post: Restrict uploading for groups in squid http://squid-web-proxy-cache.1019090.n4.nabble.com/flexible-managing-of-request-body-max-size-with-squid-2-5-STABLE12-td1022653.html

    Read the article

  • 301 redirect Rule For Load Balance F5 BigIp

    - by Kshah
    I have a load balancer F5 Big ip for my website. Currently, I am having 302 redirect in place; however, I wanted to apply 301 but dont know how. For example: My website (abc.com) when typed 302 redirects to abc.com/index and when typed www.abc.com 302 redirects www.abc.com/index. I wanted to have a rule which will help me in abc.com - 301 redirect - www.abc.com/index abc.com/index - 301 redirect - www.abc.com/index www.abc.com - 301 redirect - www.abc.com/index Below is the code that my tech person is trying: Redirect to WWW when HTTP_REQUEST { if { [HTTP::host] equals "abc.com" or [HTTP::host] equals "abc.co.in" or [HTTP::host] equals "www.abc.co.in" } { if {!( [HTTP::path] equals "/")} { HTTP::respond 301 Location "http://www.abc.com[HTTP::path]" } } } Redirect POST when HTTP_REQUEST { if { [HTTP::method] equals "POST" } { persist source_addr pool shop_shop_vr4_http } } Redirect-VR4 HOMEPAGE when HTTP_REQUEST { if { [HTTP::path] equals "/" or [HTTP::path] starts_with "/target/" or [HTTP::path] starts_with "/logs/" or [HTTP::path] starts_with "/config/" } { HTTP::redirect "http://[HTTP::host]/index.jsp.vr" } }

    Read the article

  • Form recognition using OCR and return image of the value

    - by Jonathan
    I'm on a project that process hundreds of forms. The forms have consistent formats but are filled out by hand by different people. I need a way to quickly processing all of these data into electronic forms. OCR recognition for typed document seems mature but for hand-writting is very lacking. For this thought, let's consider a form with several fields like this. Field_1: Value1 (example, Name: John, where Name is Field and John is value) Considering that forms are structured and typed, OCR should be able to recognize the fields. However, for the values of the fields, they are written and OCR will perform very poorly. So is there a way where the fields would be recognized on the imagem, then a image chunk of the value would be returned? Thanks.

    Read the article

  • Name typing in the "TO" line for last name recognition

    - by Buck
    I have outlook 2010 on a Windows 7 laptop. When I go to send an email at the "TO" line and I start typing the name, if I start to enter the last name it will not recognize anyone in my contacts and will not auto-populate a list of all the names that fit the description of what I have typed so far. But if I start typing the first name first it will start this auto-choice feature based on what I have typed so far. The company I work for has 20k + employees and If I want to email someone like "Michael Hutch " if I type "Michael" it still gives me like 800 names to chose from. My old laptop that had 2003 Outlook on it, had this functionality. Is there a way to enable this in Outlook 2010?

    Read the article

  • Can I write an Excel macro to find product info based on a SKU?

    - by GorillaSandwich
    My coworker wants to create an invoice template in Excel 2007. In column 1, he wants to be able to put in a SKU like '000293954'[1], and when he hits tab, have the other columns fill in a matching description and price. There would be a bunch of different SKUs and information. Has anybody done this type of thing with a macro before? Any advice? (I have programming experience with Javascript, PHP, and Ruby, but have never written a macro.) [1] The input wouldn't be typed - he'd use a wedge barcode scanner that inputs just like it was typed. Not that it matters for this question.

    Read the article

  • Issue changing mysql password on Debian

    - by Sean
    I installed mysql on my Debian server. I couldn't get into the database because it kept saying I put in the wrong password so I looked on the internet and found that I could log onto mysql using the command sudo mysql --defaults-file=/etc/mysql/debian.cnf From there I went typed use mysql;then mysql> UPDATE user SET password=PASSWORD('password') WHERE user='root'; Which I know switched the password because I typed the command select Host, User, Password from user; And it showed the encrypted characters had changed for all three of the root user categories. But I am still not able to login to mysql using mysql -u root -p

    Read the article

  • Firefox location bar search: odd behaviour with Comodo firewall

    - by JNat
    I recently installed Comodo firewall, and it changed the behaviour of my Firefox location bar. I used to type something there and it either redirected me to a google search page or it actually redirected me to the site I wanted at once: If I typed 'imdb cloud atlas' it would redirect me to IMDB's page on Cloud Atlas, and the same would happen if I typed 'wiki' or 'wikipedia', redirecting me to Wikipedia's page on it. Now, it redirects me here. I checked this page and everything is according to what they describe, yet it doesn't seem to act the way it should. And there are no Comodo add-ons or extensions installed on Firefox. Can anyone help me?

    Read the article

  • Creating a command that compress a file and save it on a usb, but cannot detect the usb in linux.

    - by Lance
    First of all I can't detect the USB on linux using the command line. I check the directory dev and still cannot find the usb. used the df command to check the usb. I plug and typed df and then unplug and typed df again and nothing changed. We are using a server(telnet) to use the command line of linux on a windows 7 OS. The second problem I have is how can I execute the bash script that I have made. It seems that I cant put my .sh file in /usr/bin/ I would like to make my command executable in all directories like a normal command. Sorry, im still newbie at this things. This is what I get on staying on Windows too much. Sorry for my english. Thank you in advance.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >