Search Results

Search found 984 results on 40 pages for 'assets'.

Page 6/40 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Apache AliasMatch and DirectoryMatch not working?

    - by Alex
    I have the following config - please notice the Alias and Directory equivalent -- uncommented they work as expected but the dynamic/regex based versions don't - any ideas??? <VirtualHost *:80> ServerName temp.dev.local ServerAlias temp.dev.local DocumentRoot "C:\wamp\www\temp\public" <Directory "C:\wamp\www\temp\public"> AllowOverride all Order Allow,Deny Allow from all </Directory> # Alias /private/application/core/page/assets/images/ "C:/wamp/www/temp/private/application/core/page/assets/images/" # <Directory "C:/wamp/www/temp/private/application/core/page/assets/images/"> AliasMatch ^/private/application/(.*)/(.*)/assets/images/ /private/application/$1/$2/assets/images/ <DirectoryMatch "^/private/application/(.*)/(.*)/assets/images/"> Options Indexes FollowSymlinks MultiViews Includes AllowOverride None Order allow,deny Allow from all </DirectoryMatch> </VirtualHost>

    Read the article

  • Discovery methods

    - by Owen Allen
    In Ops Center, asset discovery is a process in which the software determines what assets exist in your environment. You can't monitor an asset, or do anything to it through Ops Center, until it's discovered. I've seen a couple of questions about how to discover various types of asset, so I thought I'd explain the discovery methods and what they each do. Find Assets - This discovery method searches for service tags on all known networks. Service tags are small files on some hardware and operating systems that provide basic identification info. Once a service tag has been found, you provide credentials to manage the asset. This method can discover assets quickly, but only if the target assets have service tags. Add Assets with discovery profile - This method lets you specify targets by providing IP addresses, IP ranges, or hostnames, as well as the credentials needed to connect to and manage these assets. You can create discovery profiles for any type of asset. Declare asset - This method lets you specify the details of a server, with or without a configured service processor. You can then use Ops Center to install a new operating system or configure the SP. This method works well for new hardware. These methods are all discussed in more detail in the Asset Management chapter of the Feature Reference guide.

    Read the article

  • How do I server multiple domains from the same directory and codebase without my configuraton breaking when apache.conf is overwritten?

    - by neokio
    I have 20 domains on a VPS running cPanel. One public_html is filled with code, the remaining 19 are symbolic links to that one. (For example, assets is a directory within public_html ... for the 19 others, there's a symbolic link to that directory in each each accounts public_html dir.) It's all PHP / MySQL database driven, with content changing depending on the domain. It works like a charm, assuming cPanel has suExec enabled correctly, and assuming apache.conf does NOT have SymLinksIfOwnerMatch enabled. However, every few weeks, my apache.conf is mysteriously overwritten, re-enabling SymLinksIfOwnerMatch, and disabling all 19 linked sites for as long as it takes for me to notice. Here's the offending line in apache.conf: <Directory "/"> AllowOverride All Options ExecCGI FollowSymLinks IncludesNOEXEC Indexes SymLinksIfOwnerMatch </Directory> The addition of SymLinksIfOwnerMatch disables the sites in a strange way ... the html is generated correctly, but all css/js/image in the html fails to load. Clicking any link redirects to /. And I have no idea why. I do have a few things in my .htaccess, which work fine when SymLinksIfOwnerMatch is not present: <IfModule mod_rewrite.c> # www.example.com -> example.com RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] # Remove query strings from static resources RewriteRule ^assets/js/(.*)_v(.*)\.js /assets/js/$1.js [L] RewriteRule ^assets/css/(.*)_v(.*)\.css /assets/css/$1.css [L] RewriteRule ^assets/sites/(.*)/(.*)_v(.*)\.css /assets/sites/$1/$2.css [L] # Block access to hidden files and directories RewriteCond %{SCRIPT_FILENAME} -d [OR] RewriteCond %{SCRIPT_FILENAME} -f RewriteRule "(^|/)\." - [F] # SLIR ... reroute images to image processor RewriteCond %{REQUEST_URI} ^/images/.*$ RewriteRule ^.*$ - [L] # ignore rules if URL is a file RewriteCond %{REQUEST_FILENAME} !-f # ignore rules if URL is not php #RewriteCond %{REQUEST_URI} !\.php$ # catch-all for routing RewriteRule . index.php [L] </ifModule> I also use most of the 5G Blacklist 2013 for protection against exploits and other depravities. Again, all of this works great, except when SymLinksIfOwnerMatch gets added back into apache.conf. Since I've failed to find the cause of whatever cPanel/security update is overwriting apache.conf, I thought there might be a more correct way to accomplish my goal using group permissions. I've created a 'www' group, added all accounts to the group, and chmod -R'd the code source to use that group. Everything is 644 or 755. But doesn't seem to be enough. My unix isn't that strong. Do you need to restart something for group changes to take effect? Probably not. Anyways, I'm entering unknown territory. Can anyone recommend the right way to configure a website for multiple sites using one codebase that doesn't rely on apache.conf?

    Read the article

  • serve static play2.x content from CDN

    - by Adam Lane
    In development mode I would like to have assets served locally and when deployed in production I would like them served from the CDN. Anyone using play2 and serving content from CDN be willing to share how they are doing it? // Thinking of something like this in the routes file... @if(play.Play.isDev()) { GET /assets/*file controllers.Assets.at(path="/public", file) } else { GET CDNPATH/assets/*file controllers.Assets.at(path="CDNPATH", file) } (Note: using 2.0.2 because of the headers fix https://github.com/playframework/Play20/pull/276)

    Read the article

  • Flex 3 - Style not applying completely on dynamically created tabs in TabNavigator

    - by user254177
    When I create a tab dynamically via ActionScript, the style for the newly created (and selected) tab get applied to the skins, but not the text, unless I click on another tab and then click back to it. This is the A/S, MXML and CSS code I am using: private function clickAddTabHandler(event:Event):void{ var vbox:VBox = new VBox; var tab:Canvas = new (Canvas); vbox.label = "Select Location"; vbox.addChild(tab); tabBar.addChild(vbox); tabBar.selectedIndex = tabBar.numChildren-1; } .tabNavigator { disabledSkin: Embed(source="assets/skins/TabBar-tab_disabledSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); downSkin: Embed(source="assets/skins/TabBar-tab_downSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); overSkin: Embed(source="assets/skins/TabBar-tab_overSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); upSkin: Embed(source="assets/skins/TabBar-tab_upSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedDisabledSkin: Embed(source="assets/skins/TabBar-tab_selectedDisabledSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedUpSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedOverSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); selectedDownSkin: Embed(source="assets/skins/TabBar-tab_selectedUpSkin.png", scaleGridTop=1, scaleGridLeft=20, scaleGridBottom=18, scaleGridRight=32); textAlign: left; paddingLeft: 20; paddingRight: 20; fontSize: 11; fontFamily: Helvetica Neue; color: #FFFFFF; textRollOverColor: #FFFFFF; } .tabNavigatorSelected { textAlign: left; paddingLeft: 20; paddingRight: 20; fontSize: 11; fontFamily: Helvetica Neue; color: #135F9E; textRollOverColor: #135F9E; textSelectedColor: #135F9E; }

    Read the article

  • How to avoid double divide in loop?

    - by ignaty
    Thank you for your help. My code looks like: var CatItems = ""; for(var x=0; x < data.PRODUCTS.length; x++) { if (x % 3 === 0) CatItems += '<li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-'+[x]+' jcarousel-item-'+[x]+'-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal">'; CatItems += '<div><a class="large_image" href="#"><img src="'+ data.PRODUCTS[x].product_img +'" alt="' + data.PRODUCTS[x].product_name +'"></a><h3 class="geo_17_darkbrown">' + data.PRODUCTS[x].product_name +'</h3>'; if ( data.PRODUCTS[x].product_onsale==1 ) { CatItems += '<img alt="sale" src="assets/images/sale.gif" class="sale"><span class="geo_17_red_linethr">&pound;'+ data.PRODUCTS[x].product_retailprice +'</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;'+ data.PRODUCTS[x].product_webprice +'</span>'; } else { CatItems += '<span class="price geo_17_darkbrown">&pound;'+ data.PRODUCTS[x].product_webprice +'</span>'; } if ( data.PRODUCTS[x].product_COLOURS ) { CatItems += '<span class="colour">'; for(var y=0; y < data.PRODUCTS[x].product_COLOURS.length; y++) { CatItems += '<span><a href="'+ data.PRODUCTS[x].product_COLOURS[y].colours_large +'"><img src="'+ data.PRODUCTS[x].product_COLOURS[y].colours_thumb +'" alt="'+ data.PRODUCTS[x].product_COLOURS[y].colour_name +'" /></a></span>'; } CatItems += '</span>'; } CatItems += '</div>'; if (x % 3 === 2) CatItems += '</li>'; } and it generates this: <div class="carousel_00 jcarousel-container jcarousel-container-horizontal" style="position: relative; display: block;"> <div class="jcarousel-clip jcarousel-clip-horizontal" style="overflow: hidden; position: relative;"> <ul class="jcarousel-list jcarousel-list-horizontal" style="overflow: hidden; position: relative; top: 0px; left: 0px; margin: 0px; padding: 0px; width: 7890px;"> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-0 jcarousel-item-0-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress1.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <img class="sale" src="assets/images/sale.gif" alt="sale"> <span class="geo_17_red_linethr">£120 </span>&nbsp;&nbsp; <span class="price geo_17_darkbrown">£100 </span> <span class="colour"> <span> <a href="assets/images/colour.gif"> <img alt="Black" src="assets/images/black.gif"></a> </span> <span> <a href="assets/images/colour.gif"> <img alt="Brown" src="assets/images/brown.gif"></a> </span> <span> <a href="assets/images/colour.gif"> <img alt="Purple" src="assets/images/purple.gif"></a> </span> </span> </div> <div> <a href="#" class="large_image"> <img alt="Rachel Dress" src="assets/images/dress2.gif"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal" style="float: left; list-style: none outside none;" jcarouselindex="1"> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-3 jcarousel-item-3-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress1.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress2.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-6 jcarousel-item-6-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> </ul> </div> <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"> </div> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"> </div> <div class="jcarousel-control geo_10_darkbrown_capital"> 7 products&nbsp;&nbsp;&nbsp; <a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">4</a> <a href="#">5</a> <a href="#">6</a> <a href="#" class="last">7</a> </div> </div> It works like it should, put every 3 div's in li. but I have another problem with divide. It divide "x" inside the loop. For example in JS: <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-'+[x]+' jcarousel-item-'+[x]+'-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> And HTML out is: <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-0 jcarousel-item-0-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> then <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-3 jcarousel-item-3-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> then <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-6 jcarousel-item-6-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> etc... What I need is that count goes as 0-1-2-3-4-5-etc, but with divide it goes 0-3-6-etc and jCarousel insert blank li's 1-2, 4-5, 7-8. How I can avoid "x" divide inside the loop? Tnak you!

    Read the article

  • ASP.NET MVC static-asset aides/practices

    - by shannon
    I want to keep assets that are only used by one view in a view-specific folder, so my Search.aspx properly finds images/*.jpg, and helps me maintain my convention: ~/Areas/Candidate/Views/Job/Search.aspx -> ~/Assets/Candidate/Job/Search/images/*.jpg Perhaps with the ability to easily reference controller- or area-common assets manually or automatically: ~/Assets/Candidate/Job/images/*.jpg ~/Assets/Candidate/images/*.jpg If you wonder why I'm doing this, then speak up; I'm probably missing something. But here's why: I don't want stale static assets sitting in my ASP.NET MVC projects, which I expect to be an automatic outcome of the ~/Assets/Images folder: i.e. As a shared asset loses its last reference-count, who knows to delete it, especially with it being so difficult to trace content link validity in MVC projects? How do you, personally, do this? I can imagine, for example: Implement HtmlHelper extension methods for URL-generation. Extending ViewPage and ViewMasterPage with URL-generation methods. Implementing an inbound request filter to search related folders for static assets. and, are there good libraries out there for this? For example, something that also automatically appends timestamps for .JS and .CSS files, writes the / tags for me, and maybe even that allows me to inject includes in the head section from outside head code?

    Read the article

  • undefined method `new_record?' for nil:NilClass

    - by TopperH
    In rails 3.2 I created a post controller. Each post can have a different number of paperclip attachments. To achieve this I created a assets model where each asset has a paperclip attachment. One post has_many assets and assets belong_to post. Asset model class Asset < ActiveRecord::Base belongs_to :post has_attached_file :photo, :styles => { :thumb => "200x200>" } end Post model class Post < ActiveRecord::Base attr_accessible :content, :title has_many :assets, :dependent => :destroy validates_associated :assets after_update :save_assets def new_asset_attributes=(asset_attributes) asset_attributes.each do |attributes| assets.build(attributes) end end def existing_asset_attributes=(asset_attributes) assets.reject(&:new_record?).each do |asset| attributes = asset_attributes[asset.id.to_s] if attributes asset.attributes = attributes else asset.delete(asset) end end end def save_assets assets.each do |asset| asset.save(false) end end end Posts helper module PostsHelper def add_asset_link(name) link_to_function name do |post| post.insert_html :bottom, :assets, :partial => 'asset', :object => Asset.new end end end Form for post <%= form_for @post, :html => { :multipart => true } do |f| %> <% if @post.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> <ul> <% @post.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :title %><br /> <%= f.text_field :title %> </div> <div class="field"> <%= f.label :content %><br /> <%= f.text_area :content %> </div> <div id="assets"> Attach a file or image<br /> <%= render 'asset', :collection => @post.assets %> </div> <div class="actions"> <%= f.submit %> </div> <% end %> Asset partial <div class="asset"> <% new_or_existing = asset.new_record? ? 'new' : 'existing' %> <% prefix = "post[#{new_or_existing}_asset_attributes][]" %> <% fields_for prefix, asset do |asset_form| -%> <p> Asset: <%= asset_form.file_field :photo %> <%= link_to_function "remove", "$(this).up('.asset').remove()" %> </p> <% end -%> </div> Most of the code is taken from here: https://gist.github.com/33011 and I understand this is a rails2 app, anyway I don't understand what this error means: undefined method `new_record?' for nil:NilClass Extracted source (around line #2): 1: <div class="asset"> 2: <% new_or_existing = asset.new_record? ? 'new' : 'existing' %> 3: <% prefix = "post[#{new_or_existing}_asset_attributes][]" %> 4: 5: <% fields_for prefix, asset do |asset_form| -%>

    Read the article

  • How to Load Dependent Files on Demand + Check if They're Loaded or Not?

    - by br4inwash3r
    I'm trying to implement an assets/dependency loader that i've found from an old article at 24Ways.org. most of you might be familiar with it. it's from this article by Christian Heilmann: http://24ways.org/2007/keeping-javascript-dependencies-at-bay i've modified the script to load CSS files as well. and it's now quite close to what i want. but i still need to do some checking to see wether an asset have been completely loaded or not. just wondering if you guys have any ideas :) here's what my script currently looked like: var assetLoader = { assets: { products: { js: 'products.js', css: 'products.css', loaded: false }, articles: { js: 'articles.js', css: 'articles.css', loaded: false }, [...] cycle: { js: 'jquery.cycle.min.js', loaded: false }, swfobject: { js: 'jquery.swfobject.min.js', loaded: false } }, add: function(asset) { var comp = assetLoader.assets[asset]; var path = '/path/to/assets/'; if (comp && comp.loaded == false) { if (comp.js) { // load js var js = document.createElement('script'); js.src = path + 'js/' + comp.js; js.type = 'text/javascript'; js.charset = 'utf-8'; // append to document document.getElementsByTagName('body')[0].appendChild(js); } if (comp.css) { // load css var css = document.createElement('link'); css.rel = 'stylesheet'; css.href = path + 'css/' + comp.css; css.type = 'text/css'; css.media = 'screen, projection'; css.charset = 'utf-8'; // append to document document.getElementsByTagName('head')[0].appendChild(css); } } }, check: function(asset) { assetLoader.assets[asset].loaded = true; } } Christian explains this method in his article in great detail. I don't want to confuse you guys anymore with my bad english :P and here's an example of how i run the script: ... // load jquery cycle plugin if (page=='tvc' || page=='products') { if (!assetLoader.assets.cycle.loaded) { assetLoader.add('cycle'); } } // load products page assets if (!assetLoader.assets.products.loaded) { assetLoader.add('products'); } ... this kind of approach is very problematic though. coz assets loads asynchronously, which means some of the code inside products.js that depends on jquery.cycle.js might continue running before jquery.cycle.js is even loaded resulting in errors. while i'm quite aware that scripts can be attached with an onload event, i'm just not really sure how to implement it to my script. anyone care to help me? please... :P

    Read the article

  • Getting "stack level too deep" error when deploying with Capistrano, Rails 3.1 ruby 1.9.2

    - by Victor S
    Here is the log for the cap deploy script output around where the error occurs. Anny suggestions why this might be happening? Thanks! [yup.la] executing command [yup.la] sh -c 'cd /srv/www/portrait/releases/20120406051647 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile' ** [out :: yup.la] rake aborted! ** [out :: yup.la] ** [out :: yup.la] stack level too deep ** [out :: yup.la] (in /srv/www/portrait/releases/20120406051647/app/assets/stylesheets/mobile.css.scss) ** [out :: yup.la] ** [out :: yup.la] Tasks: TOP => assets:precompile:primary ** [out :: yup.la] (See full trace by running task with --trace) ** [out :: yup.la] command finished in 30868ms *** [deploy:update_code] rolling back * executing "rm -rf /srv/www/portrait/releases/20120406051647; true" servers: ["yup.la"] [yup.la] executing command [yup.la] sh -c 'rm -rf /srv/www/portrait/releases/20120406051647; true' command finished in 288ms failed: "sh -c 'cd /srv/www/portrait/releases/20120406051647 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on yup.la /Users/victorstan/Sites/portrait ?

    Read the article

  • Can the Flash CS4 [embed] tag be made to export assets to frame 2 rather than frame 1?

    - by Tim Knauf
    We're working on a Flash CS4 project where the main .fla file has ballooned in size and 'Publish' is taking forever. I suspect a large amount of the size (and at least some of the compile time) is due to the quantity of audio symbols in the library. I would love to remove this unnecessary bloat from the .fla file. I've experimented with removing an audio symbol from the library and using the [embed] metadata tag instead, like so: [Embed(source="audio/music/EndOfLevelDitty.mp3")] public var EndOfLevelDitty:Class The resulting published file works perfectly, but there is a problem. Our game uses a preloader on the first frame of the timeline, so all other classes need to be exported in frame 2 (as set in Publish Settings ActionScript 3.0 Settings). So a size report normally begins like this: Frame # Frame Bytes Total Bytes Scene ------- ----------- ----------- ---------------- 1 284515 284515 Scene 1 2 5485305 5769820 (AS 3.0 Classes Export Frame) However, if I use an [embed] tag on a small sound, my size report is now: Frame # Frame Bytes Total Bytes Scene ------- ----------- ----------- ---------------- 1 363320 363320 Scene 1 2 5407240 5770560 (AS 3.0 Classes Export Frame) As you can see, the embedded sound has been exported into frame 1 rather than frame 2. If I were to embed all sounds in this manner, the size of frame 1 would grow to be huge, and users would be looking at a white screen for ages before the preloader frame even loaded. So my question is this: can I use an [embed] tag but have the embedded asset export in frame 2 instead of frame 1? Project constraints: Our team composition means we can't change to pure Flex at this stage. The compiled .swf needs to be 'all in one', so we can't split the preloader into a separate file, and we can't access external resources. Edit: I'd also settle for having the audio in an embedded library SWC, but there seems to be no way to make that embed in frame 2 either; it always ends up in frame 1.

    Read the article

  • How to read LARGE Sqlite file to be copied into Android emulator, or device from assets folder?

    - by Peter SHINe ???
    I guess many people already read this article: Using your own SQLite database in Android applications: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/comment-page-2/#comment-12368 However it's keep bringing IOException at while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } I’am trying to use a large DB file. It’s as big as 8MB I built it using sqlite3 in Mac OS X, inserted UTF-8 encoded strings (for I am using Korean), added android_meta table with ko_KR as locale, as instructed above. However, When I debug, it keeps showing IOException at length=myInput.read(buffer) I suspect it’s caused by trying to read a big file. If not, I have no clue why. I tested the same code using much smaller text file, and it worked fine. Can anyone help me out on this? I’ve searched many places, but no place gave me the clear answer, or good solution. Good meaning efficient or easy. I will try use BufferedInput(Output)Stream, but if the simpler one cannot work, I don’t think this will work either. Can anyone explain the fundamental limits in file input/output in Android, and the right way around it, possibly? I will really appreciate anyone’s considerate answer. Thank you. WITH MORE DETAIL: private void copyDataBase() throws IOException{ //Open your local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); }

    Read the article

  • What is the best approach to manipulate assets in Drupal from .Net application?

    - by Amandeep Singh
    I'm beginning work on a project that will access a Drupal site to create nodes on the site. This includes file uploading, as the project is to allow people to upload pictures en mass to a Drupal site with minimal ado. Note that my application is written in .Net. What I would like to know is the best approach to achieve the same? Based on initial research it looks like there are several options: 1. XML-RPC 2. Custom PHP module deployed in drupal. But, what is the way to invoke it from .Net? 3. Use a cron job to pick up the files from a watch folder. And add a cron_hook in my module to deploy the file.

    Read the article

  • Implementing Scrolling Background in LibGDX game

    - by Vishal Kumar
    I am making a game in LibGDX. After working for whole a day..I could not come out with a solution on Scrolling background. My Screen width n height is 960 x 540. I have a png image of 1024 x 540. I want to scroll the background in such a way that it contuosly goes back with camera x-- as per camera I tried many alternatives... drawing the image twice ..did a lot of calculations and many others.... but finally end up with this dirty code if(bg_x2 >= - Assets.bg.getRegionWidth()) { //calculated it to position bg .. camera was initially at 15 bg_x2 = (16 -4*camera.position.x); bg_x1=bg_x2+Assets.bg.getRegionWidth(); } else{ bg_x1 = (16 -4*camera.position.x)%224; // this 16 is not proper //I think there can be other ways bg_x2=bg_x1+Assets.bg.getRegionWidth(); } //drawing twice batch.draw(Assets.bg, bg_x2, bg_y); batch.draw(Assets.bg, bg_x1, bg_y); The Simple idea is SCROLLING BACKGROUND WITH SIZE SOMEWHAT MORE THAN SCREEN SIZE SO THAT IT LOOK SMOOTH. Even after a lot of search, i didn't find an online solution. Please help.

    Read the article

  • LWJGL SlickUtil Texture Binding

    - by Matthew Dockerty
    I am making a 3D game using LWJGL and I have a texture class with static variables so that I only need to load textures once, even if I need to use them more than once. I am using Slick Util for this. When I bind a texture it works fine, but then when I try to render something else after I have rendered the model with the texture, the texture is still being bound. How do I unbind the texture and set the rendermode to the one that was in use before any textures were bound? Some of my code is below. The problem I am having is the player texture is being used in the box drawn around the player after it the model has been rendered. Model.java public class Model { public List<Vector3f> vertices = new ArrayList<Vector3f>(); public List<Vector3f> normals = new ArrayList<Vector3f>(); public ArrayList<Vector2f> textureCoords = new ArrayList<Vector2f>(); public List<Face> faces = new ArrayList<Face>(); public static Model TREE; public static Model PLAYER; public static void loadModels() { try { TREE = OBJLoader.loadModel(new File("assets/model/tree_pine_0.obj")); PLAYER = OBJLoader.loadModel(new File("assets/model/player.obj")); } catch (Exception e) { e.printStackTrace(); } } public void render(Vector3f position, Vector3f scale, Vector3f rotation, Texture texture, float shinyness) { glPushMatrix(); { texture.bind(); glColor3f(1, 1, 1); glTranslatef(position.x, position.y, position.z); glScalef(scale.x, scale.y, scale.z); glRotatef(rotation.x, 1, 0, 0); glRotatef(rotation.y, 0, 1, 0); glRotatef(rotation.z, 0, 0, 1); glMaterialf(GL_FRONT, GL_SHININESS, shinyness); glBegin(GL_TRIANGLES); { for (Face face : faces) { Vector2f t1 = textureCoords.get((int) face.textureCoords.x - 1); glTexCoord2f(t1.x, t1.y); Vector3f n1 = normals.get((int) face.normal.x - 1); glNormal3f(n1.x, n1.y, n1.z); Vector3f v1 = vertices.get((int) face.vertex.x - 1); glVertex3f(v1.x, v1.y, v1.z); Vector2f t2 = textureCoords.get((int) face.textureCoords.y - 1); glTexCoord2f(t2.x, t2.y); Vector3f n2 = normals.get((int) face.normal.y - 1); glNormal3f(n2.x, n2.y, n2.z); Vector3f v2 = vertices.get((int) face.vertex.y - 1); glVertex3f(v2.x, v2.y, v2.z); Vector2f t3 = textureCoords.get((int) face.textureCoords.z - 1); glTexCoord2f(t3.x, t3.y); Vector3f n3 = normals.get((int) face.normal.z - 1); glNormal3f(n3.x, n3.y, n3.z); Vector3f v3 = vertices.get((int) face.vertex.z - 1); glVertex3f(v3.x, v3.y, v3.z); } texture.release(); } glEnd(); } glPopMatrix(); } } Textures.java public class Textures { public static Texture FLOOR; public static Texture PLAYER; public static Texture SKYBOX_TOP; public static Texture SKYBOX_BOTTOM; public static Texture SKYBOX_FRONT; public static Texture SKYBOX_BACK; public static Texture SKYBOX_LEFT; public static Texture SKYBOX_RIGHT; public static void loadTextures() { try { FLOOR = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/model/floor.png"))); FLOOR.setTextureFilter(GL11.GL_NEAREST); PLAYER = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/model/tree_pine_0.png"))); PLAYER.setTextureFilter(GL11.GL_NEAREST); SKYBOX_TOP = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_top.png"))); SKYBOX_TOP.setTextureFilter(GL11.GL_NEAREST); SKYBOX_BOTTOM = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_bottom.png"))); SKYBOX_BOTTOM.setTextureFilter(GL11.GL_NEAREST); SKYBOX_FRONT = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_front.png"))); SKYBOX_FRONT.setTextureFilter(GL11.GL_NEAREST); SKYBOX_BACK = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_back.png"))); SKYBOX_BACK.setTextureFilter(GL11.GL_NEAREST); SKYBOX_LEFT = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_left.png"))); SKYBOX_LEFT.setTextureFilter(GL11.GL_NEAREST); SKYBOX_RIGHT = TextureLoader.getTexture("PNG", new FileInputStream(new File("assets/textures/skybox_right.png"))); SKYBOX_RIGHT.setTextureFilter(GL11.GL_NEAREST); } catch (Exception e) { e.printStackTrace(); } } } Player.java public class Player { private Vector3f position; private float yaw; private float moveSpeed; public Player(float x, float y, float z, float yaw, float moveSpeed) { this.position = new Vector3f(x, y, z); this.yaw = yaw; this.moveSpeed = moveSpeed; } public void update() { if (Keyboard.isKeyDown(Keyboard.KEY_W)) walkForward(moveSpeed); if (Keyboard.isKeyDown(Keyboard.KEY_S)) walkBackwards(moveSpeed); if (Keyboard.isKeyDown(Keyboard.KEY_A)) strafeLeft(moveSpeed); if (Keyboard.isKeyDown(Keyboard.KEY_D)) strafeRight(moveSpeed); if (Mouse.isButtonDown(0)) yaw += Mouse.getDX(); LowPolyRPG.getInstance().getCamera().setPosition(-position.x, -position.y, -position.z); LowPolyRPG.getInstance().getCamera().setYaw(yaw); } public void walkForward(float distance) { position.setX(position.getX() + distance * (float) Math.sin(Math.toRadians(yaw))); position.setZ(position.getZ() - distance * (float) Math.cos(Math.toRadians(yaw))); } public void walkBackwards(float distance) { position.setX(position.getX() - distance * (float) Math.sin(Math.toRadians(yaw))); position.setZ(position.getZ() + distance * (float) Math.cos(Math.toRadians(yaw))); } public void strafeLeft(float distance) { position.setX(position.getX() + distance * (float) Math.sin(Math.toRadians(yaw - 90))); position.setZ(position.getZ() - distance * (float) Math.cos(Math.toRadians(yaw - 90))); } public void strafeRight(float distance) { position.setX(position.getX() + distance * (float) Math.sin(Math.toRadians(yaw + 90))); position.setZ(position.getZ() - distance * (float) Math.cos(Math.toRadians(yaw + 90))); } public void render() { Model.PLAYER.render(new Vector3f(position.x, position.y + 12, position.z), new Vector3f(3, 3, 3), new Vector3f(0, -yaw + 90, 0), Textures.PLAYER, 128); GL11.glPushMatrix(); GL11.glTranslatef(position.getX(), position.getY(), position.getZ()); GL11.glRotatef(-yaw, 0, 1, 0); GL11.glScalef(5.8f, 21, 2.2f); GL11.glDisable(GL11.GL_LIGHTING); GL11.glLineWidth(3); GL11.glBegin(GL11.GL_LINE_STRIP); GL11.glColor3f(1, 1, 1); glVertex3f(1f, 0f, -1f); glVertex3f(-1f, 0f, -1f); glVertex3f(-1f, 1f, -1f); glVertex3f(1f, 1f, -1f); glVertex3f(-1f, 0f, 1f); glVertex3f(1f, 0f, 1f); glVertex3f(1f, 1f, 1f); glVertex3f(-1f, 1f, 1f); glVertex3f(1f, 1f, -1f); glVertex3f(-1f, 1f, -1f); glVertex3f(-1f, 1f, 1f); glVertex3f(1f, 1f, 1f); glVertex3f(1f, 0f, 1f); glVertex3f(-1f, 0f, 1f); glVertex3f(-1f, 0f, -1f); glVertex3f(1f, 0f, -1f); glVertex3f(1f, 0f, 1f); glVertex3f(1f, 0f, -1f); glVertex3f(1f, 1f, -1f); glVertex3f(1f, 1f, 1f); glVertex3f(-1f, 0f, -1f); glVertex3f(-1f, 0f, 1f); glVertex3f(-1f, 1f, 1f); glVertex3f(-1f, 1f, -1f); GL11.glEnd(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } public Vector3f getPosition() { return new Vector3f(-position.x, -position.y, -position.z); } public float getX() { return position.getX(); } public float getY() { return position.getY(); } public float getZ() { return position.getZ(); } public void setPosition(Vector3f position) { this.position = position; } public void setPosition(float x, float y, float z) { this.position.setX(x); this.position.setY(y); this.position.setZ(z); } } Thanks for the help.

    Read the article

  • Using Asset Groups

    - by Owen Allen
    I got a question about putting assets in groups: "I'm planning on installing some agents manually on existing systems, and I want to have them put in a specific asset group once they're discovered. I don't see any way to tell the install script to put the asset in a group. How can I add the assets to a group, either through the UI or the CLI?" There are a few ways. In the CLI, you can use groups mode, and use this command to add an asset to a group: attach -n| --gear <asset name> -g| --group <group> You can also use -U| --uuid <UUID> to specify the asset if you have multiple assets with the same name. In the UI, you have a couple of options. You can select an asset and click Add Asset to Group to add it to a group you select. Alternatively, if you're trying to make a group for assets with a specific characteristic, you can specify rules that will automatically add assets to a group based on that characteristic.

    Read the article

  • Looking for a software to keep track of backup media

    - by Tarnschaf
    Hi, I am looking for a software that allows me to enter my used backup media (e.g. DVD1, DVD2) my backed-up assets in high-level (such as "family-photos from 2003", "laptop drivers") details of the assets ("Ninas Birthday 2003") where the backup media is currently stored when the media has been burned (to re-burn in case of media degeneration) Of course it should be possible to navigate from media to assets and backwards. I also thought about marking assets as "deprecated". If all assets on a media are deprecated, the program should tell me so I don't have to keep it any more. Does anybody know a program with this feature-set or will I have to start my own in say Access?

    Read the article

  • Asset displays in the UI

    - by Owen Allen
    I've seen a little bit of confusion about how the UI displays assets and asset information, so I thought I'd explain how information and actions are displayed.  In Ops Center, operating systems, servers, zones, Oracle VM Servers, and anything else that you can manage are called assets. When you discover them, Ops Center puts together a model in the navigation pane that shows the relationships between the assets. For example: This tree shows three servers, and the Operating Systems on each one. If one of the operating systems was a global zone, we'd see the non-global zones beneath the global zone as well. However, when you select an asset, the info in the center pane and the actions in the actions pane are the ones that apply to that specific asset, and not to its related assets. If you select a server, for example, you'll see service request info and have the option to provision a new OS. If you select an existing OS, you'll see file system information and have the option to update the OS. Actions that apply directly to the hardware aren't visible from the OS view, and vice versa.

    Read the article

  • Backup media manager, library or similar reference application

    - by Tarnschaf
    I'm looking for a backup media manager that will keep me up-to-date on where my backups are, how they're stored and what's stored on them. I want it to be able to do and keep track of the following: my used backup media (e.g. DVD1, DVD2) my backed-up assets in high-level (such as "family-photos from 2003", "laptop drivers") details of the assets ("Ninas Birthday 2003") where the backup media is currently stored when the media has been burned (to re-burn in case of media degeneration). It should be possible to navigate back and forth between media and assets. I also thought about marking assets as "deprecated". If all assets on a media are deprecated, the program should tell me so I don't have to keep it any more. Does anyone know of a program with this feature-set? Or will I have to start my own reference in something like Access?

    Read the article

  • Upgrading Agent Controllers in Oracle Enterprise Manager Ops Center 12c

    - by S Stelting
    Oracle Enterprise Manager Ops Center 12c recently released an upgrade for Solaris Agent Controllers. In this week's blog post, we'll show you how to upgrade agent controllers. Detailed instructions about upgrading Agent Controllers are available in the product documentation here. This blog post uses an Enterprise Controller which is configured for connected mode operation. If you'd like to apply the agent update in a disconnected installation, additional instructions are available here. Step 1: Download Agent Controller Updates With a connected mode Ops Center installation, you can check for product updates at any time by selecting the Enterprise Controller from the left-hand Administration navigation tab. Select the right-hand Action link “Ops Center Downloads” to open a pop-up dialog displaying any new product updates. In this example, the Enterprise Controller has already been upgraded to the latest version (Update 1, also shown as build version 2076) so only the Agent Controller updates will appear. There are three updates available: one for Solaris 10 X86, one for Solaris 8-10 SPARC, and one for all versions of Solaris 11. Note that the last update in the screen shot is the Solaris 11 update; for details on any of the downloads, place your mouse over the information icon under the details column for a pop-up text region. Select the software to download and click the Next button to display the Ops Center license agreement. Review and click the check box to accept the license agreement, then click the Next button to begin downloading the software. The status screen shows the current download status. If desired, you can perform the downloads as a background job. Simply click the check box, then click the next button to proceed to the summary screen. The summary screen shows the updates to be downloaded as well as the current status. Clicking the Finish button will close the dialog and return to the Browser UI. The download job will continue to run in Ops Center and progress can still be viewed from the jobs menu at the bottom of the browser window. Step 2: Check the Version of Existing Agent Controllers After the download job completes, you can check the availability of agent updates as well as the current versions of your Agent Controllers from the left-hand Assets navigation tab. Select “Operating Systems” from the pull-down tab lets to display only OS assets. Next, select “Solaris” in the left-hand tab to display the Solaris assets. Finally, select the Summary tab in the center display panel to show which versions of agent controllers are installed in your data center. Notice that a few of the OS assets are not displayed in the Agent Controllers tab. Ops Center will not display OS instances which do not have an Agent Controller installation. This includes Enterprise Controllers and Proxy Controllers (unless the agent has been activated on the OS instance) and and OS instances using agentless management. For Agent Controllers which support an update, the version of agent software (in this example, 2083) appears to the right of the currently installed version. Step 3: Upgrade Your Agent Controllers If desired, you can upgrade agent controllers from the previous screen by selecting the desired systems and clicking the upgrade button. Alternatively, you can click the link “Upgrade All Agent Controllers” in the right-hand Actions menu: In either case, a pop-up dialog lets you start the upgrade process. The first screen in the dialog lets you choose the upgrade method: Ops Center provides three ways to upgrade agent controllers: Automatic Upgrade: If Agent Controllers are running on all assets, Ops Center can automatically upgrade the software to the latest version without requiring any login credentials to the system SSH using a single set of credentials: If all assets use the same login credentials, you can apply a single set to all assets for the upgrade process. The log-in credentials are the same ones used for asset discovery and management, which are stored in the Plan Management navigation tab under Credentials. SSH using individual credentials: If assets use different login credentials, you can select a different set for each asset. After selecting the upgrade method, click the Next button to proceed to the summary screen. Click the Finish button to close the pop-up dialog and start the upgrade job for the agent controllers. The upgrade job runs a series of tasks in parallel, and will upgrade all agents which have been selected. Once the job completes, the OS instances in your data center will be upgraded and running the latest version of Agent Controller software.

    Read the article

  • How do Expires headers and cache manifest rules work together?

    - by Robert K
    I find the W3C's official Offline Web Applications specification to be rather vague about how the cache manifest interacts with headers such as ETag, Expires, or Pragma on cached assets. I know that the manifest should be checked with each request so that the browser knows when to check the other assets for updates. But because the specification doesn't define how the cache manifest interacts with normal cache instructions, I can't predict precisely how the browser will react. Will assets with a future expiration date be refreshed (no matter the cache headers) when the cache manifest is updated? Or, will those assets obey the normal caching rules? Which caching mechanism, HTTP cache versus cache manifest, will take precedence, and when?

    Read the article

  • Asset Discovery Video

    - by Owen Allen
    A while back, I mentioned that we'd started putting together videos that explain some aspects of Ops Center. (The first one I talked about shows you how to create a server pool.) Well, there's another video that I wanted to show you; this one is about discovering assets. There are a few different tools you can use to discover assets in Ops Center, each one appropriate for different types of assets or different environmental needs. Salvador put together this video that walks you through the options in the Add Assets wizard, explaining when each option is used and how to use them: &amp;lt;span id=&amp;quot;XinhaEditingPostion&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; We're adding more videos as we go, so if there's something else you'd like to see explained in video form, let me know.

    Read the article

  • mod_pagespeed is rewriting but not combining

    - by Marc vd M
    I have the following problem. I installed mod_pagespeed but i am not getting the results i want! It does rewrite my css and changes the to the cache url but its not combining the css files. I have seached the web and stackoverflow for it but did not find a solution. Here are the tags <link media="all" type="text/css" href="http://domain.com/assets/css/bootstrap.min.css.pagespeed.ce.Iz3TwZXylG.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.jquery-ui-1.8.24.custom.css.pagespeed.cf.9yjmvb9yjz.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.bootstrap.extend.css.pagespeed.cf.VelsS-YQRX.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.base.css.pagespeed.cf.QO1yNADs1p.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.style.css.pagespeed.cf.tRzIhRbblc.css" rel="stylesheet">

    Read the article

  • Kohana3: Absolute path to a file

    - by Svish
    Say I have a file in my kohana 3 website called assets/somefile.jpg. I can get the url to that file by doing echo Url::site('assets/somefile.jpg'); // /kohana/assets/somefile.jpg Is there a way I can get the absolute path to that file? Like if I want to fopen it or get the size of the file or something like that. In other words, I would like to get something like /var/www/kohana/assets/somefile.jpg or W:\www\kohana\assets\somefile.jpg or whatever is the absolute path.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >