Search Results

Search found 168 results on 7 pages for 'anton barkowski'.

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

  • Client-Side script to upload attachments to the Sharepoint 2007 list

    - by Clone of Anton Makrushin
    Hello. I have no good script-writing experience. So, I have a list created on MOSS 2007 with about 1000 elements and attachments enabled. I need to attach to each list item file (*.jpg) from a local folder. I doesn't have administrator privileges at MOSS server, only contributor rights Here is my script: $web = new-Object system.Net.WebClient $web.Credentials = [System.Net.CredentialCache]::DefaultCredentials $web.Headers.Add("user-agent", "PowerShell Script") $web.UploadFile('http://ruglbsrvsps/IT/Lists/Test1/', 'C:\temp\Attachments\14\Img1.jpg' ) Test1 - target list; Item1, Item2, Item3 - list items, without attachments, created manually When I run script, it returns byte array and does not upload file to the list item. Can you fix my script or advice better solution for my task (attach bulk of files to the MOSS list items, only contributor rights for target Sharepoint 2007 list) Thank you.

    Read the article

  • Automapper Type Converter from String to IEnumerable<String> is not being called

    - by Anton
    Here is my custom Type Converter. public class StringListTypeConverter : TypeConverter<String, IEnumerable<String>> { protected override IEnumerable<string> ConvertCore(String source) { if (source == null) yield break; foreach (var item in source.Split(',')) yield return item.Trim(); } } public class Source { public String Some {get;set;} } public class Dest { public IEnumerable<String> Some {get;set;} } // ... configuration Mapper.CreateMap<String, IEnumerable<String>>().ConvertUsing<StringListTypeConverter>(); Mapper.CreateMap<Source, Dest>(); The problem: StringListTypeConverter is not being called at all. Dest.Some == null.

    Read the article

  • Blog - BlogPost - BlogPostComment vs Blog - Post - Comment

    - by Anton Gogolev
    Don't really know how to formulate the title, but it should be pretty obvious from the example. More specifically, what rules do you use for naming "dependent" classes. For example, Blog is a pretty descriptive name itself, but how do I deal with posts? BlogPost or Post? Clearly, first name clearly expresses that it's a "subordinate" class, but this can quickly get out of hand with BlogPostComment, BlogPostCommentAttachment, etc. Post, on the other hand, looks like an entity completely unrelated to Blog and is easier on the eye. What are your rules/best practices?

    Read the article

  • Lambda Contains in SimpleRepository.Find

    - by Anton
    In SubSonic 3.04's SimpleRepository, I cannot seem to perform a Contains operation within a lambda expression. Here's a trivial example: SimpleRepository repo = new SimpleRepository("ConnectionString"); List<int> userIds = new List<int>(); userIds.Add(1); userIds.Add(3); List<User> users = repo.Find<User>(x => userIds.Contains(x.Id)).ToList(); I get the error message: variable 'x' of type 'User' referenced from scope '', but it is not defined Am I missing something here, or does SubSonic not support Contains in lambda expressions? If not, how would this be done?

    Read the article

  • C# Interface Inheritance (Basics)

    - by anton
    Why does the following produce a compiler error: public interface OwnSession : ISession { } [...] OwnSession s = SessionFactory.OpenSession(); // compiler error (in german unfortunately) [...] "SessionFactory" returns a "ISession" on "OpenSession()" (NHibernate)

    Read the article

  • jaxb namespaces in each element instead of root element during marshalling

    - by Anton
    By default, jaxb 2 lists all (all possible required) namespaces in root element during marshalling: <rootElement xmlns="default_ns" xmlns:ns1="ns1" xmlns:ns2="ns2"> <ns1:element/> </rootElement> Is there a way to describe namespace in each element instead of root element ?: <rootElement xmlns="default_ns"> <element xmlns="ns1"/> </rootElement> It also solves the problem of "unnecessary namespaces", which is also important in my case. Any suggestions appreciated.

    Read the article

  • Bamboo to Build Specific SVN Revision

    - by Anton Gogolev
    Hi! Imagine there's a project in Bamboo with two build plans: Staging Deployment (SD) and Production Deployment (PD). Building SD checks out latest sources, builds them and deploys a web site to a staging server. Currently, PD does all the same, namely deploys the latest version of a web site to a production server. Clearly, this is not very good: I want to be able to deploy the same exact version of a web site that was previously deployed on a staging server, not the latest one. To illustrate: suppose we're at r101 in SVN repo. Clicking "Build SD" will deploy a web site version, say, 2.1.0.101 to staging server. Now we commit a breaking change and end up at r102. Now I want to deploy to a production server. If I hit "Build PD", Bamboo will happily check out r102 and build it, resulting in version 2.1.0.102 being deployed to a production server. What I want it to do, however, is to build and deploy a version which was previously built in an SD plan (that is, 2.1.0.101). Of course I can make SD plan to tag latest-successful build as tags/builds/latest, but I would rather have Bamboo itself handle that.

    Read the article

  • boost.test and eclipse

    - by Anton Potapov
    Hi all, I'm using Eclipse CDT and Boost.Test(with Boost.Build). I would like Eclipse to parse output of Boost.Test generated during by run of test suites during build. Does anybody know how to achieve this? Thanks in advance

    Read the article

  • ServerIdentity memory leak with IHttpAsyncHandler

    - by Anton
    I have a .NET web application that consists of a single HTTP handler class that implements IHttpAsyncHandler. All requests to this handler are handled asynchronously, though some requests are short-lived and some are long-lived (nothing over a few seconds). The problem is that memory consumption grows over time as requests are handled. All profiling results point to an unbounded growth of String objects held by instances of System.Runtime.Remoting.ServerIdentity. Every String value is different, but they all look similar to: /dd41c00e_1566_4702_b660_c81cdea18a43/vigefresi5pfv8n0ekddg57z_1154.rem There is nothing in my application that uses ServerIdentity directly, and unless I am mistaken, the ServerIdentity instances are proportional to the number of incoming requests. If this is an internal .NET structure, it looks like the CLR is not cleaning up after itself. What could be causing the leak? UPDATE A little less than half of the String objects are being held by System.Runtime.Remoting. The remaining String objects are being held by System.Runtime.Serialization and look similar to: +1sgess5rjcrgbmp3kqr6bmv_3474.rem Also, the problem only seems to occur when lots of simultaneous HTTP web requests arrive.

    Read the article

  • Filtered ListView not updated

    - by Anton
    Hi! I have a ListView with a custom Adapter that extends ArrayAdapter. It's a ArrayAdapter of Type Artist. Artist is a very small class that has a name and an id. The Artist Class has toString() overridden to return just the name. I have an EditText. The EditText has an TextChangeListener where i call .getFilter().filter(chars, callback) on my adapter. In the Filter.Filterlistener().onComplete() callback i print the count and it looks really good. As i type the count decreases. So it seams everything works as advertised, but the List stays the same. I tried to call artistAdapter.notifyDataSetChanged() to force the list to redraw, but nothing happens. [see 2.)] I am tinkering around for days now! I am desperate.. Hopefully someone can have a look on my code and tell me what i am doing wrong! Thanks! Here is what i have done: 1.) Defined a ListView and an EditText like this: <EditText xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_search_text" android:layout_width="fill_parent" android:layout_height="35dip" android:layout_below="@id/header"> </EditText> <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_search" android:layout_width="fill_parent" android:layout_height="fill_parent"> </ListView> 2.) Setup my ListView in the Activities onCreate(): private ListView listView = null; private ArtistAdapter artistAdapter = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.search_artists); artistAdapter = new ArtistAdapter(this, R.layout.row, list); // 'list' is an ArrayList<Artist> listView = (ListView) findViewById(R.id.list_search); listView.setAdapter(artistAdapter); listView.setFastScrollEnabled(true); listView.setTextFilterEnabled(true); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> av, View v, int position, long id) { // do something } }); EditText txtSearch = (EditText) findViewById(R.id.list_search_text); txtSearch.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable arg0) { } public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } public void onTextChanged(CharSequence chars, int start, int before, int count) { artistAdapter.getFilter().filter(chars, new Filter.FilterListener() { public void onFilterComplete(int count) { Log.d(Config.LOG_TAG, "filter complete! count: " + count); artistAdapter.notifyDataSetChanged(); } }); } }); } 3.) This is my ArtistAdapter in short. I added an remove() and add() method: public class ArtistAdapter extends ArrayAdapter<Artist> implements SectionIndexer { private List<Artist> items; /* other stuff like overridden getView, getPositionForSection, getSectionForPosition and so on */ @Override public void remove(Artist object) { super.remove(object); items.remove(object); } @Override public void add(Artist object) { super.add(object); items.add(object); } } 4.) My artist has also the toString() overridden: public class Artist implements Comparable<Artist> { public String uid; public String name; public Artist(String id, String name) { this.uid = id; this.name = name; } public int compareTo(Artist another) { return this.name.compareToIgnoreCase(another.name); } @Override public String toString() { return this.name; } }

    Read the article

  • Why does IHttpAsyncHandler leak memory under load?

    - by Anton
    I have noticed that the .NET IHttpAsyncHandler (and the IHttpHandler, to a lesser degree) leak memory when subjected to concurrent web requests. In my tests, the development web server (Cassini) jumps from 6MB memory to over 100MB, and once the test is finished, none of it is reclaimed. The problem can be reproduced easily. Create a new solution (LeakyHandler) with two projects: An ASP.NET web application (LeakyHandler.WebApp) A Console application (LeakyHandler.ConsoleApp) In LeakyHandler.WebApp: Create a class called TestHandler that implements IHttpAsyncHandler. In the request processing, do a brief Sleep and end the response. Add the HTTP handler to Web.config as test.ashx. In LeakyHandler.ConsoleApp: Generate a large number of HttpWebRequests to test.ashx and execute them asynchronously. As the number of HttpWebRequests (sampleSize) is increased, the memory leak is made more and more apparent. LeakyHandler.WebApp TestHandler.cs namespace LeakyHandler.WebApp { public class TestHandler : IHttpAsyncHandler { #region IHttpAsyncHandler Members private ProcessRequestDelegate Delegate { get; set; } public delegate void ProcessRequestDelegate(HttpContext context); public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) { Delegate = ProcessRequest; return Delegate.BeginInvoke(context, cb, extraData); } public void EndProcessRequest(IAsyncResult result) { Delegate.EndInvoke(result); } #endregion #region IHttpHandler Members public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext context) { Thread.Sleep(10); context.Response.End(); } #endregion } } LeakyHandler.WebApp Web.config <?xml version="1.0"?> <configuration> <system.web> <compilation debug="false" /> <httpHandlers> <add verb="POST" path="test.ashx" type="LeakyHandler.WebApp.TestHandler" /> </httpHandlers> </system.web> </configuration> LeakyHandler.ConsoleApp Program.cs namespace LeakyHandler.ConsoleApp { class Program { private static int sampleSize = 10000; private static int startedCount = 0; private static int completedCount = 0; static void Main(string[] args) { Console.WriteLine("Press any key to start."); Console.ReadKey(); string url = "http://localhost:3000/test.ashx"; for (int i = 0; i < sampleSize; i++) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; request.BeginGetResponse(GetResponseCallback, request); Console.WriteLine("S: " + Interlocked.Increment(ref startedCount)); } Console.ReadKey(); } static void GetResponseCallback(IAsyncResult result) { HttpWebRequest request = (HttpWebRequest)result.AsyncState; HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result); try { using (Stream stream = response.GetResponseStream()) { using (StreamReader streamReader = new StreamReader(stream)) { streamReader.ReadToEnd(); System.Console.WriteLine("C: " + Interlocked.Increment(ref completedCount)); } } response.Close(); } catch (Exception ex) { System.Console.WriteLine("Error processing response: " + ex.Message); } } } }

    Read the article

  • How to use SSL3 instead of TLS in a particular HttpWebRequest?

    - by Anton Tykhyy
    My application has to talk to different hosts over https, and the default setting of ServicePointManager.SecurityProtocol = TLS served me well up to this day. Now I have some hosts which (as System.Net trace log shows) don't answer the initial TLS handshake message but keep the underlying connection open until it times out, throwing a timeout exception. I tried setting HttpWebRequest's timeout to as much as 5mins, with the same result. Presumably these hosts are waiting for an SSL3 handshake since both IE and Firefox are able to connect to these hosts after a 30-40 seconds' delay. There seems to be some fallback mechanism in .NET which degrades TLS to SSL3, but it doesn't kick in for some reason. FWIW, here's the handshake message my request is sending: 00000000 : 16 03 01 00 57 01 00 00-53 03 01 4C 12 39 B4 F9 : ....W...S..L.9.. 00000010 : A3 2C 3D EE E1 2A 7A 3E-D2 D6 0D 2E A9 A8 6C 03 : .,=..*z>......l. 00000020 : E7 8F A3 43 0A 73 9C CE-D7 EE CF 00 00 18 00 2F : ...C.s........./ 00000030 : 00 35 00 05 00 0A C0 09-C0 0A C0 13 C0 14 00 32 : .5.............2 00000040 : 00 38 00 13 00 04 01 00-00 12 00 0A 00 08 00 06 : .8.............. 00000050 : 00 17 00 18 00 19 00 0B-00 02 01 00 : ............ Is there a way to use SSL3 instead of TLS in a particular HttpWebRequest, or force a fallback? It seems that ServicePointManager's setting is global, and I'd really hate to have to degrade the security protocol setting to SSL3 for the whole application.

    Read the article

  • How to load entities into private collections using the entity framework

    - by Anton P
    I have a POCO domain model which is wired up to the entity framework using the new ObjectContext class. public class Product { private ICollection<Photo> _photos; public Product() { _photos = new Collection<Photo>(); } public int Id { get; set; } public string Name { get; set; } public virtual IEnumerable<Photo> Photos { get { return _photos; } } public void AddPhoto(Photo photo) { //Some biz logic //... _photos.Add(photo); } } In the above example i have set the Photos collection type to IEnumerable as this will make it read only. The only way to add/remove photos is through the public methods. The problem with this is that the Entity Framework cannot load the Photo entities into the IEnumerable collection as it's not of type ICollection. By changing the type to ICollection will allow callers to call the Add mentod on the collection itself which is not good. What are my options? Edit: I could refactor the code so it does not expose a public property for Photos: public class Product { public Product() { Photos = new Collection<Photo>(); } public int Id { get; set; } public string Name { get; set; } private Collection<Photo> Photos {get; set; } public IEnumerable<Photo> GetPhotos() { return Photos; } public void AddPhoto(Photo photo) { //Some biz logic //... Photos.Add(photo); } } And use the GetPhotos() to return the collection. The other problem with the approach is that I will loose the change tracking abilities as I cannot mark the collection as Virtual - It is not possible to mark a property as private virtual. In NHibernate I believe it's possible to map the proxy class to the private collection via configuration. I hope that this will become a feature of EF4. Currently i don't like the inability to have any control over the collection!

    Read the article

  • Most Up-To-Date C# Duck-Typing Library

    - by Anton Gogolev
    The title says it all, basically. What is the current state of the art on duck typing for C# below version 4.0? I know about Duck Typing Project, I know that BLTookit has something to that end, but I'd like to know if I'm missing something really wicked apart from DLR languages and C# 4.0. The inevitable:

    Read the article

  • Debugging in XCode as root

    - by Anton
    In my program I need to create sockets and bind them to listen HTTP port (80). The program works fine when I launch it from command line with sudo, escalating permissions to root. Running under XCode gives a 'permission denied' error on the call to binding function (asio::ip::tcp::acceptor::bind()). How can I do debugging under XCode? All done in C++ and boost.asio on Mac OS X 10.5 with XCode 3.1.2.

    Read the article

  • Yii include PHP Excel

    - by Anton Sementsov
    Im trying include PHPExcel lib to Yii, put PHPExcel.php in root of extensions, near PHPExcel folder and added that code into config/main.php // application components 'components'=>array( 'excel'=>array( 'class'=>'application.extensions.PHPExcel', ), modify /protected/extensions/PHPExcel/Autoloader.php public static function Register() { $functions = spl_autoload_functions(); foreach($functions as $function) spl_autoload_unregister($function); $functions=array_merge(array(array('PHPExcel_Autoloader', 'Load')), $functions); foreach($functions as $function) $x = spl_autoload_register($function); return $x; }// function Register() Then, trying create PHPExcel object $objPHPExcel = new PHPExcel(); but have an error: include(PHPExcel.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in Z:\home\yii.local\www\framework\YiiBase.php(418)

    Read the article

  • Where does Xcode Organizer store iPhone screenshots?

    - by Anton
    I've made a hundred of screenshots from iPhone thru Organizer but it looks like the only way to get actual files is by clicking on each screenshot and saving it. Is there any place on my Mac I can have them all? They are definitely stored somewhere -- all are listed in OrganizerScreenshots.

    Read the article

  • How to call postback using javascript on ASP.NET form

    - by Anton
    I have a web form with textbox and button. I want after "ENTER" key click on textbox postbak form. I am using next code: onkeypress=" if(event.keyCode==13) { alert(2); WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('ctl00$ContentPlaceHolder1$btnSearch', '', true, '', '', false, false)); alert(2); return false;} where WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('ctl00$ContentPlaceHolder1$btnSearch', '', true, '', '', false, false)); is javascript code for button event onclick. I get two alerts, but postback doesnot happen. Any ideas what is wrong?

    Read the article

  • How to use in jQuery data from window.open

    - by Anton
    How to use in jQuery data from window.open w = window.open("http://google.com", 'test_window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=1'); browser = w.document; // execute commands in browser $(browser).ready(function(){ alert($('input', browser).attr('name')); }); // close browser w.close(); In this example I want to open new pop-up window, load Google page and get information about loaded page element (name of input filed). I try to do this, but not found solution. Please, help me.

    Read the article

  • String to Integer Smalltalk

    - by Anton
    Pretty simple question I need to get an integer from the user and I only know how to get a string from them. So if there is a way to get an integer from the user or to convert the string to an integer please let me know.

    Read the article

  • jQuery parent element inner HTML

    - by Anton
    I am getting inner HTML of element by next way: $(this).context.innerHTML Then I am getting parent inner HTML: $(this).parent().context.innerHTML But this code returns same values. Any ideas what is wrong?

    Read the article

  • jQuery selector to identify a div by its size

    - by Anton
    I have few nested DIVs at page. I want to add event only for smalest DIV which size is more than 100x100 px. I am able to do it using conditions in code. Is it possible to do using selector? $('?????').click(function (e) { } If yes, please provide an example.

    Read the article

  • Postgre varchar field between

    - by Anton
    I have an addresses table with ZIP code field which has type VARCHAR. I need to select all addresses form this table using ZIP codes range. If I used next code: select * from address where cast(zip as bigint) between 90210 and 90220 I get an error on fields where ZIP code cann't be cast as bigint. How I can resolve this issue?

    Read the article

  • "Primary Filegroup is Full" in SQL Server 2008 Standard for no apparent reason

    - by Anton Gogolev
    Our database is currently at 64 Gb and one of our apps started to fail with the following error: System.Data.SqlClient.SqlException: Could not allocate space for object 'cnv.LoggedUnpreparedSpos'.'PK_LoggedUnpreparedSpos' in database 'travelgateway' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. I double-checked everything: all files in a single filegroup are allowed to autogrow with a reasonable increments (100 Mb for a data file, 10% for a log file), more than 100 Gb of free space is available for the database, tempdb is set to autogrow as well with plenty of free HDD space on its drive. To resolve a problem, I added second file to the filegroup and the error has gone. But I feel uneasy about this whole situation. Where' the problem here, guys?

    Read the article

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