Showing 5 random images, but everytime 2 the same images [closed] - random

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm developing a game, but I don't know how to proceed. I'm showing an image and after 5 sec it disappears and then 4 images pop up. 3 different images and 1 image that was the image that disappeared.
I don't want to show the same images everytime, so I want random images to be shown everytime you start the application. But how can I make sure that the image that disappears, also is shown in the other 4 images?
And is it possible to change the places of the 4 images everytime?
I hope someone will/can help me!
Thanks!!

You can do something like :
name your images like image0.png, .. image4.png etc..
create a random no using ->
NSInteger randomNumber = arc4random() % 5;
Which will generate no.s form 0 to 4.
3.now use something like image%# where %# would be the randomly generated number.
Mind you this is pretty basic solution. there could be better solutions out there.

Related

Bxslider - images don't show after first loading of website [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I've got a problem with bxslider. Everything work just fine except showing images in slider after first loading. They just don't appear. When you refresh the website and wait a while they appear.
The address of website: PC-DATA
Looking at your website code right now when you first load the page the .bx-viewport are using some inline styles. One of these inline styles is setting the height of the container to 0. If you change the height to the size you want it to (in this case I am guessing 460px) then it should show correctly the first time.
.bx-wrapper, .bx-viewport {
height: 460px !important;
}
Alternatively you can see what others did here. Hope that helps.

Embedding camera readable data on an image [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a set of images on a data set and I want to create an application(on android initially) so that the application would be able to take an image and match it with an image on my data set. I tried using image recognition algorithms but I had very poor recognition chances. Is there any way to unobtrusively embed data on the image itself such that when a printed version of the image is scanned by the application, it would be able to extract the embedded data? I need some direction in this regard because I seem to be punching in the dark since I haven't worked on anything like this before.
Thanks
You can try with OpenCV4Android, here is the introductory tutorial. Following SO will give you some more- Looking for OpenCV android tutorial

Drupal Image styles thumbnail, medium, large to default dimenssions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
My drupal creates thumbnails of my uploaded image (thumbnail, medium and large). How can I stop drupal from creating these?
I don't want to have redimensioned images, I want original size.
PS: Drupal creates 3 images per uploaded image, so, for me are lots of nodes.
Thank you very much in advance!
The image styles isn't generated until the first time you use them. So, if you only use the original image in your theme and also inside your administration the thumbnail, medium and large images will never be created.
To use the original image in the backend you will have to go to structure/types/manage/<contentent_type>/display and change the image style that is used for displaying your field.

Trouble identifing this barcode, using zbar and redlaser [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
So I've got this barcode (which I will attach) and I don't know how to decode it, both zbar on my desktop and redlaser on my phone cannot read it. After a lot of googling, and reading on forums I can't find similar barcodes... Any suggestions?
https://dl.dropboxusercontent.com/u/13940239/2013-04-30%2009.36.28.jpg
Sorry I realised I needed a higher repuation to post an image, here is a dropbox link
After identifing the barcode, can anyone help with zbar decoding the barcode. I'd like do set this up so the software will decode similar barcodes...
It is a Code 39 barcode with a 3 bar widths char gap, which reads '1004876532'. Almost any standard bar code reader should be able to read this type. This online bar code decoder was able to read a cleaned up version of the image you originally posted.
*the yellow arrows represent the 3 bar width character gaps.
it seams to be Code_39 format, value: 1004876532

To have no LaTeX margins for pictures [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have many types of diagrams in my paper.
I use at the moment horizontal pages to make pictures readable.
I would like to know how you can remove LaTeX margins from pages where there are pictures.
How can you have no margins for pictures in LaTeX?
Either diddle the various variables directly or use the geometry package.
LaTeX uses a lot of variable to describe the page, so setting them directly is a hassle, I really reccomend using geometry.
And remember there is a silent 1 inch margin. Moreover how close to the edge of the page you can actually print is dependent on you printer. Most won't actually let you get to the edge on any side.
The changepage package can be used to locally change the size of the area that content is put in. Documentation within the .sty file until I get around to writing a real manual.
I did this exact thing before. Here's the code:
\newenvironment{changemargin}{%
\begin{list}{}{%
\setlength{\textwidth}{\paperwidth}
\setlength{\textheight}{\paperheight}
%\setlength{\oddsidemargin}{-1in}
%\setlength{\evensidemargin}{-1in}
\setlength{\topmargin}{-1in}
\setlength{\topsep}{-1in}%
\setlength{\leftmargin}{-1.5in}%
\setlength{\rightmargin}{-1.5in}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\centering%
\item[]%
}{\end{list}}
On the page in question, I also used \clearpage, \pagestyle{empty} and enlargethispage{...}.
You can specify the width of the figure to be bigger than \textwidth.
I think includegraphics is the non-clipping version, (as opposed to includegraphics*)
I assume this would work as long as the vertical size would fit on the page.
Otherwise I'd look on CTAN for packages which allow you to change the margins on the fly.

Resources