identifier stringlengths 7 768 | collection stringclasses 3 values | open_type stringclasses 1 value | license stringclasses 2 values | date float64 2.01k 2.02k ⌀ | title stringlengths 1 250 ⌀ | creator stringlengths 0 19.5k ⌀ | language stringclasses 357 values | language_type stringclasses 3 values | word_count int64 0 69k | token_count int64 2 438k | text stringlengths 1 388k | __index_level_0__ int64 0 57.4k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://stackoverflow.com/questions/48246808 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | David C. Rankin, https://stackoverflow.com/users/3422102, https://stackoverflow.com/users/3796113, https://stackoverflow.com/users/391399, mrsteve, user2736738 | English | Spoken | 409 | 732 | C: generate array with random numbers in range (allwowing duplicates)
I want to write a C function that gets: a seed, int n (the number of random ints to generate), and upper limit (the max allowed number).
I came so far as to have somthing like this:
// I need a function definition here
// I forgot how to allocate the int array ... somehting with 'sizeof'?
srand(time(NULL)); //seed for rand
for(i = 0; i < length; i++)
array[i] = rand()%upperLimit;
return array;
Then I probably need those header files:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Question is .... ?
Looks like you are on the right track. If you ever have questions about what headers are required by any standard C function, just man functionname and look at the top -- it tells you. (wonder what time needs??) Also, if by range your prof means 1 - upperlimit, then you need rand() % upperlimit + 1 (as rand() % number returns values in the range of 0 - (number - 1))
You need #include <time.h> for the time function.
This is simple program matching your description with comments in the code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int *
alocate (unsigned int n)
{
return malloc (n * sizeof (int)); // allocate memory block for n numbers and return int pointer to it
}
int *
generate_block_with_random_numbers (unsigned int n, int upper_limit)
{
// function `int *generate_block_with_random_numbers(unsigned int n, int upper_limit)`
// gets a positive integer n as an argument
// reserves the n block of int variables in memory
// fills this block with random values
// returns a pointer to the beginning of the reserved block.
srand (time (NULL)); // seed generator
int *array = alocate (n); // note: array pointer always points to the beginning of the allocated memory
for (int i = 0; i < n; i++)
{
// you can index the array moving to its next element via [i]
array[i] = rand () % (upper_limit+1); //
}
return array;
}
int
main ()
{
unsigned int n = 5;
unsigned int upperL = 5;
int *block = generate_block_with_random_numbers (n, upperL);
// Display the data contained in the returned block:
for (int i = 0; i < n; i++)
{
printf ("%d\n", block[i]); // print it
}
return 0;
}
Output:
5
0
2
3
3
Thank you so much. Really! Was was expecting a million downvotes but instead you help. Love it!
| 33,688 |
https://nl.wikipedia.org/wiki/Tanjung%20Agung%20%28Pajar%20Bulan%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Tanjung Agung (Pajar Bulan) | https://nl.wikipedia.org/w/index.php?title=Tanjung Agung (Pajar Bulan)&action=history | Dutch | Spoken | 24 | 61 | Tanjung Agung is een bestuurslaag in het regentschap Lahat van de provincie Zuid-Sumatra, Indonesië. Tanjung Agung telt 531 inwoners (volkstelling 2010).
Plaats in Zuid-Sumatra | 49,136 |
https://min.wikipedia.org/wiki/Molophilus%20%28Molophilus%29%20albohalteratus | Wikipedia | Open Web | CC-By-SA | 2,023 | Molophilus (Molophilus) albohalteratus | https://min.wikipedia.org/w/index.php?title=Molophilus (Molophilus) albohalteratus&action=history | Minangkabau | Spoken | 42 | 113 | Molophilus (Molophilus) albohalteratus adolah langau dari famili Limoniidae. Langau ko juo marupokan bagian dari ordo Diptera, kelas Insecta, filum Arthropoda, dan kingdom Animalia.
Langau iko biasonyo tingga di tampek lambok. Larvanyo biasonyo dapek ditamukan habitatnyo di paraiaran ataupun semi parairan.
Rujuakan
Limoniidae | 41,000 |
https://stackoverflow.com/questions/532515 | StackExchange | Open Web | CC-By-SA | 2,009 | Stack Exchange | Morph, Santi, alexkent, https://stackoverflow.com/users/31489, https://stackoverflow.com/users/886837, https://stackoverflow.com/users/886839, https://stackoverflow.com/users/886870, nkormanik | English | Spoken | 341 | 490 | What is the best way to use jquery ui themeroller themes
I just for the first time downloaded jquery and jquery-ui to use/learn last night.
I figured out how to get it working, and now I am playing around with the downloadable/customizable themes on themeroller...(nice tool).
A question about best way of maximizing the use of these tools:
I am integrating jquery/jqueryUI into an existing asp.net that I have already "themed" with colors/fonts that I like using my own custom css, I used the "themeroller" app to get the jquery UI elements to more or less match with my existing css color/font schemes.
The real question is, am I doing it backwards? Would I be better of designing my themes in themeroller, and then using that generated CSS for the ALL of my app? as opposed to using themeroller to mimic the css I already have for the non-jquery UI elements?
I could see that it would be nice to be able to use themeroller, download the CSS, and then base the non-jqueryUI CSS around the generated CSS, but I don't want to try it if that is not a generally accepted approach that will end up causing me problems down the road.
What I typically do is generate a theme for jQuery using the ThemeRoller that uses the colours from my website's CSS. I don't use the ThemeRoller theme for my website though, I usually keep these 2 separate.
I personally use the full jquery theme for my whole site. The ui-widget, ui-widget-content, ui-widget-header, ui-state-default, and ui-state-active, among others. I create my menus with these tags. I think its good to fit into that model, because if I want to swap themes on the fly or change a theme later on I won't have much resistence.
Of course theirs always exceptions. So, I always put my global.css file after my ui.all.css file in my header.
Do you actually get the icons to work as well ? No matter what I try I cant seem to get them to load !
| 35,226 |
https://nl.wikipedia.org/wiki/Acropora%20monticulosa | Wikipedia | Open Web | CC-By-SA | 2,023 | Acropora monticulosa | https://nl.wikipedia.org/w/index.php?title=Acropora monticulosa&action=history | Dutch | Spoken | 31 | 58 | Acropora monticulosa is een rifkoralensoort uit de familie van de Acroporidae. De wetenschappelijke naam van de soort is voor het eerst geldig gepubliceerd in 1879 door Friedrich Brüggemann.
Rifkoralen
IUCN-status gevoelig | 34,376 |
https://meta.askubuntu.com/questions/8283 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Oli, danijelc, https://meta.askubuntu.com/users/449, https://meta.askubuntu.com/users/49102, https://meta.askubuntu.com/users/91089, user49102 | English | Spoken | 310 | 417 | Loyal ubuntu member
I have been using Ubuntu sense Ubuntu 6 .I was a helping member of the first Ubuntu.
com . I have been a member here sense day one and now i have to get 50 points before i can reply to help some one .What,s the go ?
-1 Based on your profile: member for 1 year, 11 months | This user has not participated in any tags | This user has not earned any badges | This user has not answered any questions.
Maybe if you look a little harder you may find a lot more .
Why i am asking .it looks like i have been hacked .post not where they should be .
You could try looking for user asux or asux1 or ckasux .or do you forget all the time,s we had to re register sit crash lost info .
Never had any issue with login and never had to make new user profiles. user asux exist for 1 year and 3 months but no any activity, user asux1 or ckasux not in database. If I could i would give you another -1
i should be in ubuntu testing as well .o well it must be government whipping my info out .lol thanks anyway
The privileges on Ask Ubuntu are all based around your experience with Ask Ubuntu. It's "gamification" to:
Protect us from people who would abuse things (spam et al)
Ensure that you know what features are actually for (over-use of links, comments, images, etc)
Reward users who stick with it.
It's not all frowns though because being a long-term Ubuntu, you should find it easier to answer questions which should mean you progress faster than your comrades.
maybe someone could link all my user names back to one .
Yeah that's possible… Just click the contact link in the footer.
| 23,758 |
https://stackoverflow.com/questions/25207436 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Luke Smith, https://stackoverflow.com/users/2467495, https://stackoverflow.com/users/867480, runTarm | Friulian | Spoken | 308 | 865 | Angular scope deleted on splice
When trying to remove an item from a list using splice, my entire list is destroyed? what could be cause it?
HTML:
<ul class="nav nav-tabs">
<li ng-repeat="pane in panes" ng-class="{active:pane.selected}">
<a href="" ng-click="select(pane)">
{{pane.title}}
<sup ng-click="close(pane)">x</sup>
</a>
</li>
<li>
<a href="" ng-click="createPane()">+</a>
</li>
</ul>
JS
.controller('editCtrl', ['$scope', function($scope){
$scope.panes = [];
var ctrl = this;
/*===========Select===========*/
$scope.select = function(pane) {
angular.forEach($scope.panes, function(pane) {
pane.selected = false;
});
pane.selected = true;
};
/*==========Add-Pane=========*/
this.addPane = function(pane) {
if ($scope.panes.length === 0) {
$scope.select(pane);
}
$scope.panes.push(pane);
};
/*===========Create===========*/
$scope.createPane = function() {
var pane = {
title: 'untitled',
content: 'Scope:'+$scope.$id
}
ctrl.addPane(pane);
};
/*===========Close===========*/
$scope.close = function(pane) {
var idx = $scope.panes.indexOf(pane);
//$scope.panes.splice(pane, 1);
if (idx != -1) $scope.panes.splice(idx, 1);
}
}]);
in particular I am looking at the close method, The rest work fine.
The line that you commented out is the correct syntax.
It does the same thing; it deletes all of them.
I think your list isn't destroyed by anything.
But the href="" on those <a> tags make the entire page to be refreshed when clicking the x icon.
Try removing those href like this:
<ul class="nav nav-tabs">
<li ng-repeat="pane in panes" ng-class="{active:pane.selected}">
<a ng-click="select(pane)">
{{pane.title}}
<sup ng-click="close(pane)">x</sup>
</a>
</li>
<li>
<a ng-click="createPane()">+</a>
</li>
</ul>
Hope this helps.
That was the problem. Awesome catch!
You're already passing the index of the pane you want to remove when you send $index as the parameter to your close($index) function.
Thus your close function should look like this:
$scope.close = function(i){
var removedPane = $scope.panes.splice(i,1);
// do something here with the "removedPane" if you want to
};
This line
var idx = $scope.panes.indexOf(pane);
is trying to find the index of the index being sent to the function, thus idx is most likely undefined.
EDIT
You need to go back to calling close like this:
`ng-click="close($index)"`
| 12,155 |
https://ca.wikipedia.org/wiki/Ichneumon | Wikipedia | Open Web | CC-By-SA | 2,023 | Ichneumon | https://ca.wikipedia.org/w/index.php?title=Ichneumon&action=history | Catalan | Spoken | 286 | 574 | En la literatura medieval, l'ichneumon o echinemon era l'enemic del drac. Quan veia un drac, l'ichneumon es cobria de fang i tapava els seus orificis nasals amb la seva cua, i l'atacava i el matava. Alguns consideren que també era enemic del cocodril i l'escurçó, i els atacava de la mateixa mantera.
La paraula grega traduïda com "ichneumon" va ser el nom utilitzar per designar la rata del Faraó (en anglès, pharaoh's rat), mangosta o mangosta egípcia, la qual atacava les serps. També vol dir llúdria.
Fonts
Plini el Vell [segle I dC] (Natural History, Book 8, 35–36, 37): "L'ichneumon és conegut per la seva predisposició per lluitar a mort amb la serp. Per això, primer es cobreix de diverses capes de fang, assecant-les al sol per formar una armadura. Quan està llest, ataca esquivant els atacs que rep fins que veu l'oportunitat, aleshores amb el cap de costat ataca el coll del seu enemic. L'ichneumon també ataca al cocodril d'una manera similar."
Isidor de Sevilla [segle VII dC] (Etymologies, Book 12, 2:37): "El que produeix l'olor d'aquesta bèstia, és alhora saludable i verinós en l'aliment."
Leonardo da Vinci [segle XVI] ("The Notebooks of Leonardo da Vinci" editat per Jean Paul Richter): " Aquest animal és l'enemic mortal de l'àspid. És natiu d'Egipte i quan en veu una prop seu, corre cap al llit o el fang del Nil i es cobreix per tot arreu de fang, quan s'asseca al sol, es torna a cobrir amb fang, i així, secant una després de l'altre, fa amb tres o quatre capes com una cota de malla. Quan ataca a l'àspid, lluita hàbilment amb ella, perquè es pren el seu temps agafant-la pel coll i matant-la."
Éssers mitològics | 20,545 |
https://fr.wikipedia.org/wiki/Loi%20fondamentale%20sur%20l%27%C3%A9ducation | Wikipedia | Open Web | CC-By-SA | 2,023 | Loi fondamentale sur l'éducation | https://fr.wikipedia.org/w/index.php?title=Loi fondamentale sur l'éducation&action=history | French | Spoken | 67 | 109 | La est une loi japonaise réformant le système scolaire du pays datant de 1947, introduite lors de l'occupation du pays par les Américains.
Elle introduit plusieurs grands principes comme la mixité, ou le développement de l'enseignement supérieur.
Le , elle est réformée et replacée par une nouvelle loi.
Lien externe
texte de loi
Loi sur l'éducation et guide de conduite au Japon
Loi japonaise du XXe siècle | 49,382 |
https://stackoverflow.com/questions/45799577 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Danish | Spoken | 118 | 419 | How to visualize "XYZL" point cloud?
I have a "XYZL" point cloud like this:
pcl::PointCloud<pcl::PointXYZL>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZL>);
and I want to visulize it. It is not visualizable by commands that visualize "XYZ" or "XYZRGB" point clouds.
Now, I am wondering how can I visualize this type of point cloud?
A PointXYZL could be visualized as a PointXYZI cloud. Just convert between the two, and then
void displayCloud(pcl::PointCloud<pcl::PointXYZI>::Ptr cloud, const std::string& window_name)
{
if (cloud->size() < 1)
{
std::cout << window_name << " display failure. Cloud contains no points\n";
return;
}
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer(new pcl::visualization::PCLVisualizer(window_name));
pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZI> point_cloud_color_handler(cloud, "intensity");
viewer->addPointCloud< pcl::PointXYZI >(cloud, point_cloud_color_handler, "id");
viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2, "id");
viewer->registerKeyboardCallback(keyboardEventOccurred, (void*)viewer.get());
while (!viewer->wasStopped() && !close_window){
viewer->spinOnce(50);
}
close_window = false;
viewer->close();
}
| 29,185 | |
https://stackoverflow.com/questions/10253479 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Chris, Emanuele Baccega, Gergely Ludányi, Hot Licks, James Thiele, Leo Govorko, Lodeiro, Nexus Enthu, https://stackoverflow.com/users/174955, https://stackoverflow.com/users/23526526, https://stackoverflow.com/users/23526527, https://stackoverflow.com/users/23526528, https://stackoverflow.com/users/23526711, https://stackoverflow.com/users/23526738, https://stackoverflow.com/users/530701, https://stackoverflow.com/users/581994 | English | Spoken | 281 | 373 | BattleShip Game IOS conceptual design
ok, here´s a first time noob question, sorry if that´s stupid.
I was just wondering, for a battleship kind of game, would it be a waste of memory to build a set of objects for each cell (10X10=100), with position(x,y) and state(empty,hit,missed) properties?
I was wondering if it would be better to only create an object Grid and use methods to calculate the cell positions whenever necessary (when handling cell selection with touches or drawing for example)..
It will be easier to manage if you do the latter.
The former is problematic because you may have ships that sit side-by-side or end to end and it will become difficult to know when one is completely destroyed just from the data structures you described. Two hits side-by-side could be two hits on the same ship, two hits to two different ships, or even a sinking for the smallest ship.
Go with the latter for sanity's sake.
If I was doing this, I would keep it simple, Have a 2 dimensional array, that's your 10 by 10 grid.
When someone takes a turn, calculate the position and;
if it's a miss, insert a 0 in that array cell
if it's a hit, insert a 1 in that array cell
ah yes, I forgot about identifying whole ships!
Here's another way to use the 10 by 10 array. When you place the ships give each ship a different number say 1 to 5 if you have five ships. then if you have a hit on ship 2 change that number to -2. Then search all adjacent cells - if you find any 2 the ship is not yet sunk.
| 22,611 |
https://stackoverflow.com/questions/26086914 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | dano, https://stackoverflow.com/users/2073595, https://stackoverflow.com/users/2581969, roippi | Dutch | Spoken | 101 | 214 | python implementation of list append
def my_append1(list1, item):
list1 = list1 + [item]
return
def my_append2(list1, item):
list1 += [item]
return
The above two functions give me different results:
test = [1, 2, 3]
my_append1(test, 1)
print(test) ==> [1, 2, 3]
test = [1, 2, 3]
my_append2(test, 1)
print(test) ==> [1, 2, 3, 1]
Why are they different?
+='s analogue is extend, not append
Using += is equivalent to list1.extend([item]), using list1 = list1 + [item] is just rebinding list1 inside of my_append1 to a brand new list object in the local scope, which gets thrown away when the function exists.
| 30,909 |
https://sv.wikipedia.org/wiki/Gnaphosa%20kailana | Wikipedia | Open Web | CC-By-SA | 2,023 | Gnaphosa kailana | https://sv.wikipedia.org/w/index.php?title=Gnaphosa kailana&action=history | Swedish | Spoken | 32 | 74 | Gnaphosa kailana är en spindelart som beskrevs av Benoy Krishna Tikader 1966. Gnaphosa kailana ingår i släktet Gnaphosa och familjen plattbuksspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Plattbuksspindlar
kailana | 1,933 |
https://stackoverflow.com/questions/12908658 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Czar Pino, JIGEN, Mick, Rvanlaak, https://stackoverflow.com/users/1349295, https://stackoverflow.com/users/1384374, https://stackoverflow.com/users/1748997, https://stackoverflow.com/users/1794894 | Norwegian Nynorsk | Spoken | 388 | 1,085 | Symfony2 validation doesn't work when Entity Relationships/Associations
controller
public function indexAction(Request $request)
{
$user = $this->container->get('security.context')->getToken()->getUser();
$owner = $user->getId();
$first = new First();
$first->setOwner($owner);
$second = new Second();
$second->setOwner($owner);
$second->setFirst($first);
$form = $this->createForm(new SecondType(), $second);
if ($request->getMethod() == 'POST') {
$form->bindRequest($request);
if ($form->isValid()) {
$em = $this->get('doctrine')->getEntityManager();
$em->persist($first);
$em->persist($second);
$em->flush();
}
}
return $this->render('MySampleBundle:Home:index.html.twig', array(
'form' => $form->createView(),
));
}
ORM Yaml
My\SampleBundle\Entity\First:
type: entity
table: first
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
title:
type: string
date_created:
type: datetime
date_edited:
type: datetime
owner:
type: integer
lifecycleCallbacks:
prePersist: [ prePersist ]
preUpdate: [ preUpdate ]
oneToMany:
reviews:
targetEntity: Second
mappedBy: review
My\SampleBundle\Entity\Second:
type: entity
table: second
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
review:
type: string
date_created:
type: datetime
date_edited:
type: datetime
owner:
type: integer
lifecycleCallbacks:
prePersist: [ prePersist ]
preUpdate: [ preUpdate ]
manyToOne:
first:
targetEntity: First
inversedBy: reviews
joinColumn:
name: first_id
referencedColumnName: id
Form/Type
class FirstType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('title', 'text');
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'My\SampleBundle\Entity\First',
);
}
public function getName()
{
return 'first';
}
}
class SecondType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('first', new FirstType());
$builder->add('review', 'textarea');
}
public function getName()
{
return 'second';
}
}
Validation.yml
My\SampleBundle\Entity\First:
properties:
title:
- NotBlank: ~
- MinLength: 2
My\SampleBundle\Entity\Second:
properties:
review:
- NotBlank: ~
- MinLength: 14
The created form works normally.
However, only the validation does not work normally.
If it performs individually, validation will work normally.
$form = $this->createForm(new FirstType(), $first);
However, if it is in a Entity Relationships/Associations state, the first validation will not work.The First's title property in one character will be registered.
How can I manage to achieve that?
Environment is the Symfony 2.1.2.
Just tagged to symfony2.1, if you don't mind
Symfony 2.1+ doesn't automatically validate all the embedded objects. You need to put the Valid constraint on the first field to make it validate as well:
My\SampleBundle\Entity\Second:
properties:
first:
- Valid: ~
Oh, I get it! It worked completely.
Thank you for all the advice and help you gave me.
+1 great answer @elnur. Would be great to see this in the doc on the collections validation section. Maybe I missed it.
+1, this indeed could be better documented in the validation chapter of The Book
| 46,895 |
https://ru.wikipedia.org/wiki/%D0%90%D0%B1%D0%B4%20%D0%B0%D0%BB%D1%8C-%D0%A5%D0%B0%D0%BA%D0%BA%20II | Wikipedia | Open Web | CC-By-SA | 2,023 | Абд аль-Хакк II | https://ru.wikipedia.org/w/index.php?title=Абд аль-Хакк II&action=history | Russian | Spoken | 400 | 1,160 | Абд аль-Хакк II ибн Усман Абу Мухаммад, или Абд аль-Хакк II (1419 — 1465) — последний маринидский султан Марокко в 1420—1465 годах. Он был объявлен султаном в 1420 году при регентстве ваттасидского визиря и оставался номинальным султаном до свержения в ходе восстания 1465 года.
Биография
Абд аль-Хакк был сыном султана Абу Саида Усмана III, который совершил безуспешную попытку отбить Сеуту у португальцев в 1419 году. Провал миссии привёл к хаосу в государстве Маринидов, кульминацией которого стал переворот в Фесе в 1420 году, в котором Абу Саид Усман III был убит. В то время его сыну и наследнику Абд аль-Хакку был всего один год. На трон появились и другие претенденты.
В то время губернатором Сале был Абу Закария Яхья аль-Ваттаси. Узнав о перевороте, он поспешил захватить контроль над королевским дворцом Феса, провозгласил сироту Абд аль-Хакка новым султаном, а себя — его регентом и визирем. Марокко быстро погрузился в анархию. К 1423 году регент Абу Закария аль-Ваттаси стал фактическим правителем государства.
Когда Абд аль-Хакк достиг совершеннолетия в 1437 году, Абу Закария отказался покинуть пост регента. В 1437 году португальская попытка воспользоваться спором и захватить Танжер оказалась безуспешной, что подняло моральный дух марокканцев и повысив престиж знатных шерифов, которые организовали оборону. Абу Закария сполна воспользовался победой, чтобы укрепить свою власть. Любая мысль об отмене регентства была забыта. В январе 1438 года под его руководством была обнаружена гробница Идриса II, основателя Феса и династии Идрисидов, и она стала важным местом для паломников.
Абу Закарию в 1448 году сменил его племянник Али ибн Юсуф, а его — сын Абу Закарии, Яхьи ибн Абу Закария, в 1458 году. Хотя Абд аль-Хакк номинально считался султаном, он не имел никакой власти.
Марокканское восстание 1465 года
В 1459 году султан сформировал заговор, который позволил ему оттеснить Ваттасидов от власти. В ходе резни многие Ваттасиды были убиты, но некоторые смогли бежать на север.
В 1465 году в Фесе вспыхнуло народное восстание, движущей силой которого стали местные шерифы. Восстание ознаменовало конец 215-летнего правления Маринидов: шерифы объявили джихад новому еврейскому визирю Абд аль-Хакка Аарону бен Баташу. Восставшие ворвались во дворец и перерезали султану горло. Почти вся еврейская община Феса также была перебита. Восстание позволило Афонсу V наконец захватить Танжер.
После убийства Абд аль-Хакка Мухаммад ибн Имран, глава шерифов Феса, был провозглашён султаном, однако с этим не согласились сторонники Ваттасидов. Мухаммад был свергнут в 1472 году Ваттасидом Мухаммедом аш-Шейхом, уцелевшему в резне 1459 года.
Примечания
Ссылки
Мариниды
Правители Африки XV века
Султаны Марокко | 40,871 |
https://en.wikipedia.org/wiki/Paul%20Zorner | Wikipedia | Open Web | CC-By-SA | 2,023 | Paul Zorner | https://en.wikipedia.org/w/index.php?title=Paul Zorner&action=history | English | Spoken | 4,395 | 6,689 | Paul Anton Guido Zorner, born Paul Zloch (31 March 1920 – 27 January 2014) was a German night fighter pilot, who fought in the Luftwaffe during World War II. Zorner is credited with aerial victories claimed in including fighter missions. Zorner was the ninth most successful fighter pilot in the Luftwaffe and in the history of aerial warfare.
Born in 1920 to a large family, Zorner left school in 1938 to pursue a military career. He applied to join the Luftwaffe and was accepted as a Fahnenjunker (officer candidate) in October 1938. Zorner completed his training and was licensed to fly multi-engine aircraft. He was posted to 4. Staffel (squadron) Kampfgruppe zur besonderen Verwendung 104 (KGr. z.b.v. 104, Fighting Group for Special Use) to fly Junkers Ju 52 transports. Zorner participated in the Battle of Greece and Battle of Crete in April and May 1941. Zorner also operated in the Middle East flying supplies to Syria during the Anglo-Iraqi War. Zorner continued with the unit and from June to October 1941 flew in Operation Barbarossa, the invasion of the Soviet Union.
On 20 October 1941, Zorner transferred to the German night fighter arm. He completed his training as a night fighter pilot in July 1942 and was posted to Nachtjagdgeschwader 2. On 3 October 1942, Zorner was posted to 10. Staffel (squadron) Nachtjagdgeschwader 3 (NJG 3, Night Fighter Wing 3). Zorner claimed his first victory on 17 January 1943 and on 3 March, achieved the five victories necessary to qualify as a night fighter ace (Experte). On 9 September 1943 he was appointed Staffelkapitän (squadron leader) of 8./NJG 3 after achieving 12 victories. Zorner achieved his 20th victory on 3 January 1944 and was awarded the German Cross in Gold on 20 March 1944 for 35 night victories.
On 4 April 1944, Zorner was appointed Gruppenkommandeur (Group Commander) of III./Nachtjagdgeschwader 5 (NJG 5). On 9 June, Zorner was awarded the Knight's Cross of the Iron Cross for 48 bombers destroyed. Zorner was awarded the Knight's Cross of the Iron Cross with Oak Leaves on 17 September 1944. Zorner was appointed Gruppenkommandeur of II./NJG 100 on 13 October 1944 and remained the commanding officer until May 1945. Zorner achieved his 59th, and last, a victory on 5/6 March 1945.
Zorner surrendered to United States Army forces on 8 May 1945. Zorner and his unit were handed over to the Red Army on 17 May and he remained a prisoner in the Soviet Union until December 1949. After his release he studied engineering and retired in 1981. Zorner died in January 2014 aged 93.
Early life
Paul Zorner was born on 31 March 1920 in Roben, Leobschütz, Upper Silesia. He was a son of head teachers and one of eight children. Zorner expressed an interest in Glider flying in his early years but the size of the family strained his parents' financial resources and he could not take up the hobby. In the spring, 1938 aged 18, Zorner passed his Abitur, school leaving certificate. Zorner desired a military flying career and he applied to join the Luftwaffe and was accepted as a Fahnenjunker (officer candidate) in October 1938.
On 8 November 1938 Zorner began his Flugzeugführerausbildung (pilot training) as a learner pilot at Oschatz-Sachsen. On 14 March 1939 he was accepted as Fähnrich and transferred to Berlin-Gatow. There, he completed the first stage of his officer training on 31 October 1939. Zorner progressed through the A/B Schools (elementary flying schools) and trained at the Flugzeugführerschule C in Lönnewitz to gain his pilot license on multi-engine aircraft from 1 November 1939 to the 30 June 1940. He was promoted to the officer rank Leutnant (Second Lieutenant) on 1 April 1940.
From 4–30 June 1940 Zorner was based at the Fluglehrerschule (flight instructor school) in Brandenburg and from the 1 July 1940 – 15 January 1941 he attended the Flugzeugführerschule C 11 to complete his advanced training. Zorner attended the Blindflugschule (Blind Flying School) at Neuburg an der Donau from 23 August–16 September 1940 to qualify for night flying.
World War II
Zorner was posted to 4. Staffel (squadron) Kampfgruppe zur besonderen Verwendung 104 (KGr.z.b.v. 104—Fighting Group for Special Use) to fly the Junkers Ju 52 transport aircraft. The unit deployed to Athens, Greece in April 1941. It assisted in the airborne drop against Crete—Unternehmen Merkur (Operation Mercury). Zorner flew over 160 missions in the Mediterranean and North African theatre. The most notable action was the Anglo-Iraqi War in May 1941. KGr.z.b.v. 104 flew spare part supplies for Zerstörergeschwader 76 (Destroyer Wing 76) in Iraq. Zorner recorded transport flights from Athens to Aleppo. Zorner was awarded the Iron Cross Second Class on 6 June 1941 for his service. KGr.z.b.v. 104 then moved to Romania to participate in Operation Barbarossa, the invasion of the Soviet Union. It supported Army Group South in the initial assault but then disbanded in the autumn. Zorner left KGr.z.b.v. 104 on 8 October 1941.
Night fighter
Following the 1939 aerial Battle of the Heligoland Bight, bombing missions by the Royal Air Force (RAF) shifted to the cover of darkness, initiating the Defence of the Reich campaign. By mid-1940, Generalmajor (Brigadier General) Josef Kammhuber had established a night air defense system dubbed the Kammhuber Line. It consisted of a series of control sectors equipped with radars and searchlights and an associated night fighter. Each sector, named a Himmelbett (canopy bed), would direct the night fighter into visual range with target bombers. In 1941, the Luftwaffe started equipping night fighters with airborne radar such as the Lichtenstein radar. This airborne radar did not come into general use until early 1942.
Zorner joined the German night fighter force on 20 October 1941 and was ordered to Schleißheim, Austria, to attend the Nachtjadgschule 1 (Night Fighter School 1) to begin conversion and night fighter training on the Messerschmitt Bf 110. At Schleißheim Zorner learned the rudiments of air combat and day fighter tactics which he completed on 28 December 1941. From 1 January 1942 Zorner undertook night fighter training Nachtjadgschule 1, at the Ingolstadt base. On 1 April 1942 he was promoted to Oberleutnant (First Lieutenant). He graduated on 20 May 1942. The final phase of training was completed with Ergänzungs-Nachtjagdgruppe (Supplementary Night Hunting Group) at Stuttgart.
Zorner was posted to 8. Staffel (squadron), II. Gruppe (Group) Nachtjagdgeschwader 2 (NJG 2—Night Fighter Wing 2) based at Gilze-Rijen Air Base in the Netherlands on 1 July 1942. On 3 October 1942 Zorner was moved again, this time to 10./Nachtjagdgeschwader 3 (NJG 3—Night Fighter Wing 3), at Grove, where he remained until 5 December 1942. The next day he was ordered to Wittmundhafen and appointed Staffelkapitän (squadron leader) of 2./NJG 3. Zorner held this command until 15 March 1943. The Staffel was equipped with the Dornier Do 217 night fighter. Zorner disliked flying the Dornier and lobbied his commanding officer, Gruppenkommandeur Egmont Prinz zur Lippe-Weißenfeld to fly the Bf 110. Lippe-Weißenfeld agreed on the condition that he flies both operationally in rotation with other units.
On the night of 17/18 January 1943 Air Officer Commanding (AOC) RAF Bomber Command, Arthur Harris ordered an attack on Berlin. 170 Avro Lancaster and 17 Handley-Page Halifax bombers carried out the operation. It was to be the last attack on the German capital until the H2S ground scanning radar became available. Zorner intercepted a Halifax northwest of Juist and shot it down at 21:55. Zorner achieved this success on his 14th mission as a night fighter pilot.
Bomber Command attacked Wilhelmshaven with 177 aircraft—129 Lancaster, 40 Halifax and eight Short Stirlings on 11/12 February 1943. The Pathfinders found that the Wilhelmshaven area was covered by cloud. The British marked the target by parachute flares using H2S. The naval ammunition depot at Mariensiel to the south of Wilhelmshaven blew up and caused widespread damage in the naval dockyard and in the town. Zorner engaged a Lancaster west northwest of Borkum and claimed it shot down over the North Sea. Zorner was the only pilot in the Luftwaffe to claim a victory on this night. One of the three crews lost in the operation flew in Lancaster I, DX-D, of No. 57 Squadron RAF. Sergeant K. T. Dutton and his six crewmembers disappeared and were listed "lost without trace."
After his second victory, Geschwaderkommodore Johann Schalk warned Zorner for leaving the Do 217s idle. On Zorner's next flight, he operated the type. Zorner claimed his third victory on 19 February, north of Norderney at 20:34. The bomber was recorded as a Douglas A-20 Havoc. During the engagement Zorner's Dornier sustained a hit in the wing and one through the starboard engine casing causing an oil leak, necessitating a forced landing on one engine. Although Zorner claimed a probable, an anti-aircraft artillery battery had witnessed the enemy bomber flying just above the sea before it disappeared into the mist. Since its recovery was deemed impossible, he was granted the victory. Zorner's victim was Vickers Wellington II, BJ1919 OW-P of No. 426 Squadron RAF piloted by Sergeant J. O. R. Gauthier. Sergeants H. R. Bailey, F. Ruzycki, R. C. Ramsay, Flight Sergeant R. W. Ferrier and Pilot Officer C. A. McKinnon, all of RCAF, were posted missing in action. The aircraft has never been found, and likely crashed into the North Sea. On the night of 26 February Zorner claimed a Short Stirling northwest of Schiermonnikoog at 20:46.
Ruhr and Baltic
Air Marshal Harris, AOC RAF Bomber Command escalated the air war in 1943 and began a concerted effort to destroy the industrial German Ruhr region through area bombing. From March to July 1943 Bomber Command began the campaign, dubbed the Battle of the Ruhr. Harris had 53 squadrons, 16 of which were medium bombers equipped with H2S terrain mapping radar. Zorner's first victory in the defence of the Ruhr came on the night of the 7/8 March 1943 northeast of Norden at 20:50 when he claimed a Wellington. The only other claimant was Karl-Heinz Scherfling. Zorner's victim was probably Wellington HE202, SE-Z, piloted by Sergeant Derek Cecil of No. 431 Squadron RAF. The bomber was conducting "Gardening" (minelaying operations) by the Frisian Islands when it was shot down. All five crewmen became prisoners of war.
Zorner claimed another Wellington on 13/14 March at 03:51, north of Norderney, one of only two claims. This machine was BK296, PT, from No. 420 Squadron RCAF. Pilot Flight Sergeant Charles Harrison Tidy and his crew were killed. Zorner was made Staffelkapitän of 8./NJG 3 two days later. In April 1943 Zorner was ordered to carry out two daylight operations against the United States Army Air Force (USAAF). Zorner found the task unsuitable for the Bf 110. A combat box of B-17 Flying Fortress bombers had eight firing positions and a formation of nine could muster over 100 guns. The Bf 110 was adjudged to be only faster and the most effective tactic, the head-on-attack, could only be executed three times for the aircraft could not position itself in front of the bomber formations quickly enough: the endurance of two hours forty-five minutes was not sufficient for these lengthy manoeuvres. On the second sortie he flew Lippe-Webenfeld's Bf 110 but was hit in both wings and engines and force-landed without success near Cloppenburg.
Zorner claimed his 7th victory on 28/29 June southeast of Antwerp, Belgium at 02:20. It was recorded as a Halifax bomber. Another Wellington was claimed southwest of Sint-Truiden at 01:09. Zorner achieved his 10th victory west of Malmedy at 01:53. Zorner's 11th victory was shot down northeast of Groningen at 03:54 on 24/25 July. His victim was Lancaster R5573 flown by Flight Sergeant Kenneth Hector Wally McLean from No. 106 Squadron RAF. Zorner saw the Lancaster crash and explode which resulted in a fire-work display of green, red and white flashes. They assumed the aircraft to be a pathfinder, and the flashes exploding flares. Soon afterwards Zorner and his crewman had to abandon the Bf 110G-4 because an engine caught fire. Zorner extinguished the fire but he could no longer calibrate the propeller pitch to a glide setting. The other power plant could not cope with the added workload and the Bf 110 began to lose height. Zorner ordered his crew to leave. Zorner struggled to exit as his parachute snagged. He managed to clamber back into the cockpit and lower the flaps which slowed the aircraft and afforded him time to unhook the parachute from the strengthening beam in the cockpit and parachute to safety.
Zorner had to wait several weeks for another successful engagement. On 18 August 1943 Bomber Command carried out Operation Hydra, an attack on the Peenemünde Army Research Center. At 01:53 over the Baltic Sea Zorner claimed a Lancaster followed by another Lancaster over Peenemünde at 02:03—his 13th victory. It was his last victory with 3./NJG 3. On 9 September 1943 he was appointed Staffelkapitän of 8./NJG 3.
Battle of Berlin
At the beginning of November 1943 Zorner's Bf 110G was fitted with a FuG 220 Lichtenstein SN-2 radar. The new radar was not affected by "window". On the night of 18/19 November 1943 as RAF Bomber Command began their Berlin offensive and Zorner led 8. Staffel through his most successful period of operations. Operating from Lüneburg, Zorner scrambled to intercept 383 aircraft, 365 Lancaster, 10 Halifax and eight de Havilland Mosquito bombers which attacked Berlin on 23/24 November 1943. Zorner caught a Lancaster at 20:09 northwest of Berlin and dispatched the bomber for his 14th victory. On 2 December, Zorner accounted for two Lancaster bombers: one near Diepholz at 19:24 and southwest of Berlin at 20:29. On 20 December at 20:02 claimed a Lancaster. The location was recorded as "Hintetmeiligen". On 23/24 December 1943 Bomber Command returned to Berlin. Zorner claimed three Lancasters: one east of Giessen at 03:02, another south of Diepholz at 05:43 and a third at 06:02 over Cloppenburg. One of the bombers was Avro Lancaster III ED999, KM-X, from No. 44 Squadron RAF, piloted by Sergeant R. L. Hands. Hands and his crew were killed in action.
Zorner maintained his success in 1944. Over Luckenwalde at 03:10 on 3 January 1944 Zorner accounted for his 21st victory. On the 6 January at 02:42 and 02:51 he claimed two Lancasters northwest of Stettin and on 20 January at 19:31 and 19:45 he claimed one Halifax (LL135) and one Lancaster (JB419), while operating north west of Berlin. These victories were achieved with the Schräge Musik which had been installed on his Bf 110G-4 prior to the patrol. Four weeks later, on 15 February, Zorner filed claims for two Lancaster bombers at 20:22 and 21:11 near Berlin. The latest Lancaster bombers took his victory total to 27. On 20 February at 03:04 and 03:17 near Wesendorf, at 03:26 over Gardelegen, and at 03:41 south of Briest, Zorner claimed a Lancaster shot down to record his 28th–31st aerial victories.
On 24/25 February 1944, Bomber Command turned its attention to Schweinfurt. 554 Lancaster, 169 Halifax and 11 Mosquito bombers carried out the attack. The route took the bomber stream over Stuttgart. Bomber Command lost 26 Lancaster and seven Halifax bombers (4.5 per cent). Zorner claimed five bombers shot down, becoming an ace in one sortie. The first claim was made west of Stuttgart at 22:15, southwest of the city at 22:22, southwest at 22:30, west at 00:25 and finally north of Stuttgart at 00:51. All five were Lancasters. The latter two claims were made after midnight thus Zorner did not qualify for ace in a day status. By day-break Zorner had been officially credited with 35 enemy bombers destroyed in night operations.
On 1 March 1944 Zorner was promoted to Hauptmann (Captain). He continued to command 8. Staffel. He downed two Lancasters on 22 March in the Frankfurt area between 21:42 and 22:16. A solitary claim on 24 March was followed by a triple claim on 26 March. A single Lancaster was engaged and destroyed north of Oberhausen at 22:01, west of Sint Truiden at 23:03 and then southwest of Brussels at 23:12. For his achievements in battle Zorner was awarded the German Cross in Gold on 20 March 1944. On 4 April 1944 Zorner was appointed Gruppenkommandeur of III./Nachtjagdgeschwader 5 (NJG 5), based at Mainz Finthen Airport having relinquished his command of 8. Staffel the day before. In the early hours of 21 April 1944 Zorner claimed a rare victory for the German night fighter arm—a de Havilland Mosquito. Southeast of Antwerp at 03:00 Zorner spotted an aircraft which appeared to be a Junkers Ju 88 flying on one engine. Zorner closed to and saw it was an enemy aircraft. He fired a burst that shattered the good engine. The British bomber dived into haze and four minutes later the crew observed an explosion on the ground. The following morning a Mosquito was confirmed shot down. The Mosquito belonged to No. 169 Squadron RAF. DD616, was operating out of RAF Little Snoring, Norfolk. Flight Lieutenant Morgan and his navigator Flight Sergeant Bentley bailed out.
Gruppenkommandeur
On the night of 27/28 April 1944, Bomber Command struck at Friedrichshafen with 322 heavy bombers. The diversion attacks confused German defences and no bomber was lost on the inward flight. The German night fighter reorganised and 18 were shot down on the homeward route. Zorner intercepted southeast of Nancy claimed it destroyed at 01:20. After 31 minutes Zorner's radar operator Heinrich Wilke gained another contact and Zorner duly shot down a second Lancaster southwest of Strasbourg. Northwest of Friedrichshafen, he shot down another bomber at 02:10. Zorner claimed a single victory on 1 June at 02:35 over Tergnier and the 3 June northwest of Evreux.
On 6 June 1944 Operation Overlord began. On that morning the D-Day landings began in Normandy. Within twenty-four hours Zorner's Gruppe had relocated to Athies-sous-Laon. The night fighter force resisted the Allied air forces over France by night and the skies over France became a target-rich environment. The RAF Second Tactical Air Force and the Ninth US Tactical Air Force flew night operations alongside bomber command. For the Luftwaffe, the night actions also produced dangers. Their bases were within easy range of No. 100 Group RAF night fighters.
Two days after his deployment to France, Zorner was awarded the Knight's Cross of the Iron Cross () on 9 June for 48 victories. He received the award from Joseph Schmid, commanding 1. Jagdkorps. On the night of the 10/11 June 1944 he shot down four bombers targeting railway installations. The victories (nos. 49–52) were recorded west and southwest of Dreux with two more Lancaster bombers falling over Verneuil-sur-Avre between 01:00 and 01:42. The first three bombers were claimed within eight minutes. Zorner achieved a double victory on 25/26 June. Bomber Command sent 739 bombers including 53 Lancaster, 165 Halifax and 39 Mosquito bombers to attack the V-1 flying bomb sites in the Pas-de-Calais. At 00:30, east of Boulogne Zorner shot down a Lancaster with his front-firing guns and he used his Schärge Musik armament to down a second—his 54th victory.
On the 1 July at 01:22 near Bourges Zorner shot down another Lancaster. On 24/25 July 1944 Bomber Command returned to the V-1 sites. Northwest of both Strasbourg and Saint-Dizier, between 02:35 and 02:54 Zorner claimed victory number 57 and 58. Zorner remained with NJG 5 but did not file another claim as the German front in Normandy collapsed. On 17 September 1944 Zorner became the 588th recipient of the Knight's Cross of the Iron Cross with Oak Leaves (). It was not presented to Zorner until 2 December 1944 when he was handed the medal by Reichsmarshal Hermann Göring, commander-in-chief of the Luftwaffe at the Reichsluftfahrtministerium. By this time III./NJG 5 was based at Lübeck.
Zorner was transferred from front-line operations and on 13 October 1944 he appointed Gruppenkommandeur of II./Nachtjagdgeschwader 100 equipped with Ju 88G night-fighters based at Nový Dvůr. On 1 December 1944 Zorner was promoted to major. He commanded the unit in operations over Czechoslovakia and Austria until 8 May 1945. The promotion came six days after his radar operator Feldwebel Heinrich Wilke, was awarded the Knight's Cross on 25 November 1944 for participating in all Zorner's 58 victories. II./NJG 100 was subordinated to the 7th Jagddivision (7th Fighter Division).
The Geschwader relocated several times owing to Red Army advances, moving to Vienna, Linz, Prague and finally to Karlsbad in western Germany. The Gruppe was overloaded with 53 of the Ju 88G-6 models and Zorner had 630 men under his command. Only 35 were technically fit for operations and he classified only four as combat ready. On the evening of 5/6 March 1945, the group was ordered to scramble a single Ju 88. Zorner decided to fly himself, after a long period of non-operational flying. South southwest of Graz, he shot down Consolidated B-24 Liberator at 01:30.
One B-24 was lost on this night to a night fighter. Liberator VI KH150, "R", of 34 Squadron SAAF was shot down and the crew were killed. Lieutenant J. B. Masson, C. E. Park, Second Lieutenant C. D. Foord, Flying Officer F. S. A. Thomas, A. R. Thomas, M. A. Ueckermann, R. V. Wilkson and Sergeant A. Stables died. They are buried in Udine, Italy.
Later life
Zorner surrendered his Gruppe to United States Army forces near Karlovy Vary on 8 May 1945. Only Zorner and an interpreter were allowed through the lines. Zorner refused to abandon his men and for a week he remained with them under American guard. He was then handed over to Soviet Forces on 17 May. The men were marched without food for to Hoyerswerda north east of Dresden. Zorner was separated from his men and confined with 2,000 other officers. They survived on rations of fish soup and bread. In October 1945 he was transported to the Caucasus Mountains, in southern Russia. Some 500 officers were sent to a camp at Tkibuli, near Kutaisi, in the Georgian region of the Soviet Union. The prisoners organised the camp themselves. They were permitted to travel within a radius around the camp as long as their work assignments were complete. The German prisoners received some form of monetary payment.
Highly decorated officers were responsible for the kitchen and keeping the peace in the camp. The rooms were four by three metres in area. On the longer wall a wooden framework was mounted. Across this layered boards which measured two metres in length were stacked with a varying gap of . Outside was a corridor that was a metre wide. In 18 of the 20 rooms 500 prisoners were housed, usually 22 per room. The prisoners had to travel some on foot every morning to a quarry were they worked for eight hours drilling out limestone and fed 600 grams of bread and half a litre of cabbage soup. Zoner worked in the camp until the end of 1946.
In January 1946 Zorner was moved to a harsher environment in a coal mine. He heard a rumour that officers of Major rank and above could not be forced to work. He refused to work anymore and was subjected to punishment by the NKVD. The following day he was locked in solitary confinement. The following morning Zorner explained that he would prefer to work as a carpenter and the NKVD officers agreed. From April 1946 the conditions slowly improved in the camp. Ill-treatment from the guards, which had been rare anyway, stopped altogether. At the end of 1947 the prisoners were allowed to send letters to Germany. In 1948 they were permitted to receive packages from their families. In March 1949, Zorner and others planned to escape to Turkey, but events overtook them and the prisoners were repatriated to Germany.
On 19 December 1949 the prisoners were deloused, given new clothes, and transported to Brest-Litovsk on 23 December. From there he was sent to Frankfurt, where he arrived on 29 December. On 1 January 1950 he was sent to Ulm and was processed on 2 January. Zorner then travelled to Kaiserslautern in the French zone of occupation to obtain his discharge certificate and was officially a civilian on 3 January 1950.
Zorner studied mechanical engineering in Stuttgart and entered the field of refrigeration engineering before he rejoined the West German Air Force (Luftwaffe) in 1956. He was not passed fit to fly jet fighters and returned to civilian life in May 1957. He was employed within the chemical industry. He retired in 1981 as a chief engineer with Hoechst near Frankfurt. In May 2006, Zorner received the Order of Merit of the Federal Republic of Germany () for his voluntary services as founder of the "Silesian Partnership" (). The association, which was founded in 1995, aims to improve German-Polish relations and, among other things, has organised help during the 1997 Central European flood. Zorner died on 27 January 2014 in Homburg.
Summary of career
Aerial victory claims
According to US historian David T. Zabecki, Zorner was credited with 58 aerial victories. Obermaier also lists him with 59 nocturnal aerial victories, claimed in 272 combat missions, 110 of which as a night fighter.
Awards
Iron Cross (1939)
2nd Class (9 June 1941)
1st Class (12 March 1943)
Honour Goblet of the Luftwaffe (Ehrenpokal der Luftwaffe) on 20 September 1943 as Oberleutnant and Staffelkapitän
Front Flying Clasp of the Luftwaffe
in Bronze for Transport Pilots on 21 August 1941
in Silver for Transport Pilots on 22 October 1941
in Gold for Night Fighter Pilots on 30 March 1944
German Cross in Gold on 20 March 1944 as Oberleutnant in the 8./Nachtjagdgeschwader 3
Knight's Cross of the Iron Cross with Oak Leaves
Knight's Cross on 9 June 1944 as Hauptmann and Staffelkapitän of the 8./Nachtjagdgeschwader 3
588th Oak Leaves on 17 September 1944 as Hauptmann and Gruppenkommandeur of the III./Nachtjagdgeschwader 5
Medal of Merit of the Order of Merit of the Federal Republic of Germany (2006)
Notes
References
Citations
Bibliography
Further reading
1920 births
2014 deaths
People from Głubczyce County
Military personnel from the Province of Silesia
German World War II flying aces
Luftwaffe pilots
Recipients of the Gold German Cross
Recipients of the Knight's Cross of the Iron Cross with Oak Leaves
German prisoners of war in World War II held by the Soviet Union
University of Stuttgart alumni
Recipients of the Medal of the Order of Merit of the Federal Republic of Germany | 7,508 |
https://ceb.wikipedia.org/wiki/Kali%20Cakul | Wikipedia | Open Web | CC-By-SA | 2,023 | Kali Cakul | https://ceb.wikipedia.org/w/index.php?title=Kali Cakul&action=history | Cebuano | Spoken | 37 | 59 | Suba ang Kali Cakul sa Indonesya. Nahimutang ni sa lalawigan sa Jawa Timur, sa habagatan-kasadpang bahin sa nasod, km sa sidlakan sa Jakarta ang ulohan sa nasod.
Ang mga gi basihan niini
Mga suba sa Jawa Timur | 27,756 |
https://ce.wikipedia.org/wiki/%D0%93%D1%83%D1%8C%D1%80%D1%87%D0%B0%D0%BC%20%28%D0%90%D0%B9%D0%B2%D0%B0%D0%B4%D0%B6%D0%B8%D0%BA%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Гуьрчам (Айваджик) | https://ce.wikipedia.org/w/index.php?title=Гуьрчам (Айваджик)&action=history | Chechen | Spoken | 40 | 183 | Гуьрчам () — Туркойчоьнан Ӏаьржа хӀордан регионан Самсун провинцин (ил) Айваджикнан кӀоштара эвла/микрокӀошт ().
Географи
Истори
Бахархой
Билгалдахарш
Хьажоргаш
Самсун провинцин нах беха меттигаш
Самсун провинцин микрокӀошташ
Айваджикнан микрокӀошташ
Айваджикнан кӀоштан нах беха меттигаш
Туркойчоьнан микрокӀошташ
Туркойчоьнан нах беха меттигаш | 38,187 |
https://nl.wikipedia.org/wiki/Mazamet | Wikipedia | Open Web | CC-By-SA | 2,023 | Mazamet | https://nl.wikipedia.org/w/index.php?title=Mazamet&action=history | Dutch | Spoken | 332 | 639 | Mazamet is een gemeente in het Franse departement Tarn (regio Occitanie). De plaats maakt deel uit van het arrondissement Castres. Mazamet telde op inwoners.
Geschiedenis
Het kasteel van Hautpoul werd gebouwd rond de 10e eeuw op een rots die uitkijkt over de valleien van de Thoré, de Arnette, de Linoubre en de Arn. In 1212 werd Hautpaul veroverd op de katharen door Simon IV van Montfort.
Mazamet ontstond op een lager gelegen plaats aan de Arnette. In de 13e eeuw kreeg de plaats stadsrechten van Jourdain de Saissac, heer van Hautpol. Mazamet kreeg een kasteel en een stadsmuur en telde in de 16e eeuw ongeveer 500 inwoners. De bevolking koos voor een groot deel voor het protestantisme en de stad werd in 1628 vernield door het leger van Hendrik II van Bourbon-Condé.
Al aan het einde van de 16e eeuw was Mazamet bekend door haar wolindustrie. In de 18e eeuw werd er ook papier en karton geproduceerd. De textielindustrie nam een hoge vlucht halfweg de 19e eeuw. Voortaan werd niet enkele wol ingevoerd uit Frankrijk en Spanje, maar werden hele schapenhuiden ingevoerd uit Argentinië. In Mazamet werd een speciaal procedé ontwikkeld om de wol te scheiden van de huid, waarbij gebruik werd gemaakt van het kalkarme water van de Arnette. De wol en het leer werden daarna elders verder verwerkt. In 1912 werden zo 32 miljoen schapenhuiden verwerkt in Mazamet, afkomstig uit de ganse wereld. Vanaf de jaren 1970 verdween deze industrie stilaan.
Geografie
De oppervlakte van Mazamet bedroeg op ; de bevolkingsdichtheid was toen inwoners per km².
De onderstaande kaart toont de ligging van Mazamet met de belangrijkste infrastructuur en aangrenzende gemeenten.
Verkeer en vervoer
In de gemeente ligt spoorwegstation Mazamet.
Demografie
Onderstaande figuur toont het verloop van het inwonertal (bron: INSEE-tellingen).
Bezienswaardigheden
De 140 meter lange voetbrug over de kloof van de Arnette
Kasteelruïne van Hautpoul
Geboren
Laurent Jalabert (30 november 1968), wielrenner
Nicolas Jalabert (13 april 1973), wielrenner
Christophe Bassons (10 juni 1974), wielrenner
Externe links
Informatie over Mazamet | 40,282 |
https://stackoverflow.com/questions/54868254 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | Don Brody, Ionut Necula, claudiopb, https://stackoverflow.com/users/1264804, https://stackoverflow.com/users/3275665, https://stackoverflow.com/users/6899860, https://stackoverflow.com/users/8480460, isherwood | Danish | Spoken | 412 | 1,007 | Rendering a layout using an example as guide
I have this component that renders a menu:
import React, { Component } from 'react'
import { BrowserRouter as Router, Route, NavLink } from 'react-router-dom'
import Intro from './Intro'
import Houses from './Houses'
import PortfolioPage from './PortfolioPage'
import Cronology from './Cronology'
var data = require('./db.json');
class PortfolioMenu extends Component {
constructor(props) {
super(props)
this.state = {
portfolioClass: "",
interiors: [],
furnitures: [],
studies: [],
houses: []
}
}
componentDidMount() {
this.setState({
interiors: data.interiors[0],
furnitures: data.furnitures[0],
studies: data.studies[0],
houses: data.houses
})
}
render() {
return (
<div>
<Router>
<div class="wrapper2">
<div class="wrapper-portfolio">
<Route exact path='/portfolio' render={() => <Intro />} />
<Route exact path='/portfolio/casas' render={() => <Houses data={this.state.houses}/>} />
<Route exact path='/portfolio/interiores' render={() => <PortfolioPage data={this.state.interiors}/>} />
<Route exact path='/portfolio/moveis' render={() => <PortfolioPage data={this.state.furnitures}/>} />
<Route exact path='/portfolio/estudos' render={() => <PortfolioPage data={this.state.studies}/>} />
<Route exact path='/portfolio/cronologia' render={() => <Cronology />} />
</div>
<nav>
<ul className={`portfolio-menu ${portfolioClass}`}>
<li><NavLink activeClassName="active" isActive={this.isActive} exact to="/portfolio">• introdução</NavLink></li>
<li><NavLink activeClassName="active" exact to="/portfolio/casas">• casas</NavLink></li>
<li><NavLink activeClassName="active" exact to="/portfolio/interiores">• interiores</NavLink></li>
<li><NavLink activeClassName="active" exact to="/portfolio/moveis">• móveis</NavLink></li>
<li><NavLink activeClassName="active" exact to="/portfolio/estudos">• estudos</NavLink></li>
<li><NavLink activeClassName="active" exact to="/portfolio/cronologia">• cronologia</NavLink></li>
</ul>
</nav>
</div>
</Router>
</div>
)
}
}
export default PortfolioMenu
And I would like to do the <li> to behave like this example below:
How can I solve it? I would like to render in this exact way that is showing on this example. Doing this distribution of li's elements. I want to make four blocks on the first row and two on the second.
Like the example how? Inline blocks? Varying block sizes? What layout library or framework are you using? The question is very broad.
Im using React and I'm using pure css without any lte
You need to make an effort before asking. I see no attempt at layout in your question.
I would use flex if I were you. Something like this https://jsfiddle.net/14agh0L9/
If you have to use pure CSS (as you mentioned in your comment above), you'll want to use CSS grids.
If you're open to using a third-party JavaScript library, I'd recommend looking into Material-UI. Specifically their Grid component.
Your question makes it look like you're relatively new to front-end development, so I'd recommend the second approach. Material-UI includes many commonly used components that are well tested across multiple browsers. It's a good way to create a nice layout and design without as much headache.
Take a look at this blog post comparing the two. There are benefits and drawbacks to both.
| 32,733 |
https://stackoverflow.com/questions/43328619 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Michael - sqlbot, Zanon, https://stackoverflow.com/users/1476885, https://stackoverflow.com/users/1695906 | English | Spoken | 447 | 601 | Serverless/Lambda + S3: Is it possible to catch a 'GetObject' event and select a different resource?
What I'm trying to do is catch any image file request and check if that image doesn't exists, return a different image.
I'm taking a look at Lambda and the Serverless Framework, but I couldn't find much information about this. Is it even possible?
There is no GetObject event. Please, follow this link for a list of supported events. S3 will only notify you (or trigger a Lambda function) when an object is created, removed or lost due to reduced redundancy.
So, it's not possible to do exactly what you want, but you have a few alternatives.
Alternatives
Use Lambda@Edge to intercept your calls to a CloudFront distribution that uses a S3 as Origin. This interceptor could be able to send another file if the requested one is missing. This is not a good solution since you would increase latency and costs to your operation.
Instead of offering a S3 endpoint to your clients, offer a API Gateway endpoint. In this case, ALL image requests would be processed by a Lambda function with the possibility to give another file if the requested one is missing. This is not a good solution since you would increase latency and costs to your operation.
And the best option, that may work, but I have not tried, is to configure a S3 bucket Redirection Rule. This is a common use case for static website hosting where a page not found (status code 404) redirects to another page (like page-not-found.html). In your case, you could try to redirect to an address of a default image. This solution would not use Lambda functions.
"You could indeed create a S3 event to trigger a Lambda function on GetObjects" Events are for object creation and deletion. There is no GetObject event in S3.
@Michael-sqlbot, thanks for correcting me! I've updated my answer. I thought that you could create S3 notifications for any kind of S3 operations, but in fact the list of event types is very restricted.
S3 events allow you to hook anything that changes the bucket. That is their purpose. Also, you might also test your theory with Lambda@Edge. I tested early on in the preview and found that origin errors don't trigger the Lambda response functions. I worked around that with L@E plus an S3 redirect rule and then rewrote the Location: header from S3, using regex logic in Lambda to allow more flexible rewriting than S3 allows... but L@E can only do limited content substitution -- the L@E environment is more restrictive than ordinary Lambda -- no network access, no temp space, or AWS SDK.
| 5,255 |
https://ceb.wikipedia.org/wiki/Taylor%20Creek%20Sawmill%20Spring | Wikipedia | Open Web | CC-By-SA | 2,023 | Taylor Creek Sawmill Spring | https://ceb.wikipedia.org/w/index.php?title=Taylor Creek Sawmill Spring&action=history | Cebuano | Spoken | 181 | 273 | Tubud ang Taylor Creek Sawmill Spring sa Tinipong Bansa. Ang Taylor Creek Sawmill Spring nahimutang sa kondado sa Powder River County ug estado sa Montana, sa sentro nga bahin sa nasod, km sa kasadpan sa ulohang dakbayan Washington, D.C. metros ibabaw sa dagat kahaboga ang nahimutangan sa Taylor Creek Sawmill Spring.
Ang yuta palibot sa Taylor Creek Sawmill Spring kay medyo bungtoron, ug nga tinakpan sa ubos sa kasadpan. Ang kinahabogang dapit sa palibot dunay gihabogon nga ka metro ug km sa sidlakan sa Taylor Creek Sawmill Spring. Kunhod pa sa 2 ka tawo kada kilometro kwadrado sa palibot sa Taylor Creek Sawmill Spring. Hapit nalukop sa kasagbotan ang palibot sa Taylor Creek Sawmill Spring. Sa rehiyon palibot sa Taylor Creek Sawmill Spring, mga tubud talagsaon komon.
Ang klima bugnaw nga ugahon. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Agosto, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Mayo, sa milimetro nga ulan, ug ang kinaugahan Enero, sa milimetro.
Saysay
Ang mga gi basihan niini
Mga tubud sa Montana (estado) | 16,956 |
https://stackoverflow.com/questions/5923434 | StackExchange | Open Web | CC-By-SA | 2,011 | Stack Exchange | Dam Vad, SiRR0KK0, darlinton, https://stackoverflow.com/users/113229, https://stackoverflow.com/users/12786781, https://stackoverflow.com/users/12786782, https://stackoverflow.com/users/12786783, https://stackoverflow.com/users/12786986, rytheitguy, soukaina | English | Spoken | 118 | 239 | How to post in Facebook with @mention ability using stream.publish?
I would like to include inline links friends within the message of a stream.publish call. Here is example pyFacebook code:
Code:
facebook.request_extended_permission("publish_stream")
facebook.stream.publish("@John Doe is cool")
Is there a way to include markup in the message to do this?
src: http://forum.developers.facebook.net/viewtopic.php?pid=339920
Facebook had included a way to do this notifications, about 2 years ago but unfortunately, the functionality hasn't made it's way into the stream publishing methods. So, for right now, it's not possible to tag a user's friends in a post that you are composing via your application. ::sad trombone:: heh
it was possible for a while. i do not know if it is still possible. http://bugs.developers.facebook.net/show_bug.cgi?id=12947
| 33,369 |
https://stackoverflow.com/questions/5084211 | StackExchange | Open Web | CC-By-SA | 2,011 | Stack Exchange | Abhishek V, Ajmal Ahmadi, Anya Teal, Jacob Relkin, Matt.M, Rog, Sun, https://stackoverflow.com/users/10817030, https://stackoverflow.com/users/10817031, https://stackoverflow.com/users/10817032, https://stackoverflow.com/users/10819199, https://stackoverflow.com/users/10846842, https://stackoverflow.com/users/217208, https://stackoverflow.com/users/220819, https://stackoverflow.com/users/401092, https://stackoverflow.com/users/580574, mapvis01, nlutterman | English | Spoken | 784 | 2,081 | UIImageView Allocating Memory Every Time Image Changed - How To Release?
I'm trying to create an application that allows users to go through a set of images like a magazine. I've got one UIView class on top of the AppDelegate and on swipe to the left/right I'm either going forward or backward a page. My problem is that when I swipe and change the image source the program keeps allocating more memory, and I'm not certain where/how to release the previously allocated memory. I've looked in to the difference between imageNamed and imageWithContentsOfFile and I believe I'm using those correctly so I'm stumped. Any help would be much appreciated!
AppDelegate.h
@interface AppDelegate : NSObject {
UIWindow *window;
MagazineWebViewController *webViewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet MagazineWebViewController *webViewController;
- (void)goToA:(NSNumber *)page;
@end
AppDelegate.m
@implementation AppDelegate
@synthesize window, webViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
webViewController = [[MagazineWebViewController alloc] init];
NSNumber *page = [NSNumber numberWithInt:1];
[webViewController setPage:page];
[window addSubview:webViewController.view];
[window makeKeyAndVisible];
}
- (void)goToA:(NSNumber *)page {
UIImage *image = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@", page] ofType:@"png"]];
webViewController.imageView.image = image;
[image release];
[webViewController setPage:page];
}
- (void)dealloc {
[webViewController release];
webViewController = nil;
[window release];
[super dealloc];
}
@end
MagazineWebViewController.h
@interface MagazineWebViewController : UIViewController {
UIImageView *imageView;
NSNumber *page;
}
@property (nonatomic, assign)NSNumber *page;
@property (nonatomic, retain)UIImageView *imageView;
- (void)swipeLeft;
- (void)swipeRight;
- (void)tableOfContents;
@end
MagazineWebViewController.m
@implementation MagazineWebViewController
@synthesize page, tocController, imageView;
- (id)init {
UINavigationBar *navBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 768, 60)];
navBar.tintColor = [UIColor blackColor];
UIBarButtonItem *contents = [[UIBarButtonItem alloc] initWithTitle:@"Table of Contents" style:UIBarButtonItemStylePlain target:self action:@selector(tableOfContents)];
UINavigationItem *item = [[UINavigationItem alloc] initWithTitle:@"Title"];
item.leftBarButtonItem = contents;
item.hidesBackButton = YES;
[navBar pushNavigationItem:item animated:NO];
[contents release];
[item release];
[self.view addSubview:navBar];
[navBar release];
self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 40, 768, 984)];
UIImage *image = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"1" ofType:@"png"]];
self.imageView.image = image;
[image release];
self.imageView.contentMode = UIViewContentModeScaleToFill;
UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft)];
swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
[self.view addGestureRecognizer:swipeLeft];
[swipeLeft release];
UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight)];
swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:swipeRight];
[swipeRight release];
[self.view addSubview:self.imageView];
[self.imageView release];
return self;
}
- (void)swipeLeft {
int pageNum = [page intValue];
if (pageNum < 115) {
pageNum++;
UIViewAnimationTransition trans = UIViewAnimationTransitionCurlUp;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:trans forView:self.view.window cache:YES];
BaseballMagazine2011AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[appDelegate goToA:[NSNumber numberWithInt:pageNum]];
[UIView commitAnimations];
}
}
- (void)swipeRight {
int pageNum = [page intValue];
if (pageNum > 1) {
pageNum--;
UIViewAnimationTransition trans = UIViewAnimationTransitionCurlDown;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:trans forView:self.view.window cache:YES];
BaseballMagazine2011AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[appDelegate goToA:[NSNumber numberWithInt:pageNum]];
[UIView commitAnimations];
}
}
- (void)tableOfContents {
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc. that aren't in use.
}
- (void)viewDidUnload {
[imageView release];
imageView = nil;
[page release];
page = nil;
[tocController release];
tocController = nil;
[super viewDidUnload];
}
- (void)dealloc {
[imageView release];
imageView = nil;
[page release];
page = nil;
[super dealloc];
}
@end
Where do you invoke [super init]? This may be the reason why you're experiencing some issues...
There are no obvious leaks in your code and this memory is likely to be flushed as required by the system. In any case you could try setting the image property to nil in your goToA: method and see if it helps i.e. if (webViewController.imageView.image) webViewController.imageView.image = nil;. Also after you release image on the same method you can try and set it to nil as well.d
Unfortunately neither of those has fixed the problem. Instruments is telling me it's allocating Malloc and CFString a lot.
Did you ever find the solution?
In your AppDelegate.m, Try prefacing each reference to webViewController with 'self.'. For example:
self.webViewController = [[MagazineWebViewController alloc] init];
By not referencing the property with self, you are bypassing the properties auto generated setters and getters. And since you set this property to retain, this would bypasses some memory handling logic. I'm pretty sure that is your issue... Hope this helps!
Also in MagazineWebViewController.m there are several instances of imageView in your viewdidUnload and Dealloc method that you should also preface with 'self.'
I think it's because you alloc every time an UIImage (like said in the comments).
Did you try not doing allocations ?
self.imageView.image = [ UIImage imageNamed:@"1.png" ];
I think you won't have any problem with this.
But it's difficult to say where come from the leak without all your program ^^
Maybe a retain property or something like that.
I originally had it like that with the same results. I changed it from imageNamed to imageWithContentsOfFile because imageNamed caches the images. What's posted above is all of the code being run. I have a TableOfContentsViewController.h/m but I have the method to call that controller blank.
| 33,509 |
https://en.wikipedia.org/wiki/Icon%20%28Sheila%20E.%20album%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Icon (Sheila E. album) | https://en.wikipedia.org/w/index.php?title=Icon (Sheila E. album)&action=history | English | Spoken | 36 | 66 | Icon is the seventh album from Sheila E, released on Mooscious Records.
Track listing
The US edition contains three additional songs: "Fiesta", "Born and Raised" and "Oakland n da House".
References
2013 albums
Sheila E. albums | 30,429 |
https://en.wikipedia.org/wiki/Copyright%20law%20of%20Albania | Wikipedia | Open Web | CC-By-SA | 2,023 | Copyright law of Albania | https://en.wikipedia.org/w/index.php?title=Copyright law of Albania&action=history | English | Spoken | 126 | 168 | Law No. 35/2016 "On the Rights of the Author and Other Rights Related to" was approved by the Albanian Parliament on 31 March 2016. The purpose of the law is to guarantee the protection of the author's copyrights and other related rights.
Summary
The subject matter of copyrighted work shall be any original intellectual creation in the literary, artistic and scientific domain, having an individual character, irrespective of the manner and form of its expression, its type, value or purpose, unless otherwise provided for in this law.
Works of Copyright subjected to protection shall be in particular:
The protections of the author's rights are specifically mentioned in Article 58 of the Constitution of Albania
See also
Albanian Copyright Office
General Directorate of Industrial Property
References
Albania | 25,572 |
https://ms.wikipedia.org/wiki/Almeida%2C%20Boyac%C3%A1 | Wikipedia | Open Web | CC-By-SA | 2,023 | Almeida, Boyacá | https://ms.wikipedia.org/w/index.php?title=Almeida, Boyacá&action=history | Malay | Spoken | 19 | 49 | Almeida merupakan sebuah kawasan perbandaran dan komuniti yang terletak di wilayah Boyacá Timur, Boyacá, Colombia.
Kawasan perbandaran di Colombia | 29,862 |
https://ceb.wikipedia.org/wiki/Tetranycopsis%20kuzminae | Wikipedia | Open Web | CC-By-SA | 2,023 | Tetranycopsis kuzminae | https://ceb.wikipedia.org/w/index.php?title=Tetranycopsis kuzminae&action=history | Cebuano | Spoken | 51 | 111 | Kaliwatan sa murag-kaka ang Tetranycopsis kuzminae. Una ning gihulagway ni Strunkova ni adtong 1969. Ang Tetranycopsis kuzminae sakop sa kahenera nga Tetranycopsis, ug kabanay nga Tetranychidae.
Kini nga matang hayop na sabwag sa:
Tayikistan
Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Murag-kaka
Tetranycopsis
Murag-kaka sa Tadjikistan | 10,698 |
https://en.wikipedia.org/wiki/Hoodtown | Wikipedia | Open Web | CC-By-SA | 2,023 | Hoodtown | https://en.wikipedia.org/w/index.php?title=Hoodtown&action=history | English | Spoken | 170 | 257 | Hoodtown is a novel by Christa Faust, first published in the United States in 2004.
Synopsis
Hoodtown is the story of "X", a former rudo luchadora (bad-guy female wrestler) who fell from grace in the professional Lucha Libre world, and now resides in Hoodtown, her old stomping grounds. The former luchadora makes a modest living, still as a luchadora, but as a private luchadora, who dishes out pain in hourly sessions to masochistic men who are thrilled to be smacked around by Ms. X.
Her new job is interrupted when masked prostitutes in Hoodtown are found not only murdered, but left unmasked, which is every bit as horrible in itself as death, a great dishonor. X then becomes a self-taught private eye searching for the killer since the police, who do not reside in Hoodtown, and like most maskless people in this novel's society, spit upon masked folks as members of the lowest caste, are nonchalant about finding the murderer.
References
2004 American novels
Novels set in Mexico
Lucha libre | 11,204 |
https://ceb.wikipedia.org/wiki/Quebrada%20Bel%20Macho | Wikipedia | Open Web | CC-By-SA | 2,023 | Quebrada Bel Macho | https://ceb.wikipedia.org/w/index.php?title=Quebrada Bel Macho&action=history | Cebuano | Spoken | 107 | 191 | Suba nga anhianhi ang Quebrada Bel Macho sa Kolombiya. Nahimutang ni sa departamento sa Departamento del Valle del Cauca, sa sentro nga bahin sa nasod, km sa kasadpan sa Bogotá ang ulohan sa nasod. Ang Quebrada Bel Macho mao ang bahin sa tubig-saluran sa Río Magdalena.
Ang kasarangang giiniton °C. Ang kinainitan nga bulan Marso, sa °C, ug ang kinabugnawan Nobiyembre, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Oktubre, sa milimetro nga ulan, ug ang kinaugahan Hulyo, sa milimetro.
Ang mga gi basihan niini
Río Magdalena (suba sa Kolombiya, lat 11,10, long -74,85) tubig-saluran
Mga suba sa Departamento del Valle del Cauca | 165 |
https://stackoverflow.com/questions/4179079 | StackExchange | Open Web | CC-By-SA | 2,010 | Stack Exchange | Annarine T. Gantuangco, Dominik Schieman, Gin Van, KUTG, Sekhar sarthak, dasen, https://stackoverflow.com/users/474880, https://stackoverflow.com/users/8800551, https://stackoverflow.com/users/8800552, https://stackoverflow.com/users/8800553, https://stackoverflow.com/users/8800592, https://stackoverflow.com/users/8800615, https://stackoverflow.com/users/8858193, https://stackoverflow.com/users/8858194, saber hossein zade, user8800592 | English | Spoken | 251 | 494 | Why do I get an undefined reference( to `glColor3f' ,for example) when I compile a program in c?
I'm compiling an example program that uses opengl in ubuntu (linux). A short snippet of the code is the following:
#include <stdlib.h>
#include <GL/glut.h>
void createBox( GLfloat centroX, GLfloat centroY,
GLfloat corR, GLfloat corG, GLfloat corB )
{
/* Cor */
glColor3f( corR, corG, corB );
I've installed all of the packages to develop in opengl (in ubuntu), namely:
freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa
libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev
I compile the example like this:
gcc -lGL CG_ex04.c -o main
and I get the following
/tmp/ccDWmJDZ.o: In function `createBox':
CG_ex04.c:(.text+0x31): undefined reference to `glColor3f'
and other errors along the same line.
Does anyone know what I'm doing wrong?
Thanx in advance for any help.
This has everything to do with your compiler, and not the library you use. Please remove the opengl and glut tags :-)
Fixed the tags and title. Please remember this next time you post a question. Tags are meant to be relevant to your problem, not to be used just because your program uses a particular API.
Try gcc -o main CG_ex4.c -lGL. The correct order of gcc parameters is important.
damn it, that was it, although it didn't work at first, I stil had to add '-lglut' to the command line, but now it works like a charm. Thanx a lot!
Try including GL/gl.h as well as glut. Kind of weird though, since glut actually includes both gl.h and glu.h.
| 15,334 |
https://ar.wikipedia.org/wiki/%D9%85%D8%A7%D9%86%D9%8A%20%D8%AF%D9%88%D9%83%D9%88 | Wikipedia | Open Web | CC-By-SA | 2,023 | ماني دوكو | https://ar.wikipedia.org/w/index.php?title=ماني دوكو&action=history | Arabic | Spoken | 118 | 340 | ماني دوكو هو لاعب كرة قدم هولندي يلعب كمهاجم مع نادي إنفرنيس.
المراجع
لاعبو كرة قدم رجالية هولنديون مغتربون
لاعبو كرة قدم رجالية مغتربون في إنجلترا
لاعبو كرة قدم رجالية هولنديون
أشخاص على قيد الحياة
رياضيون هولنديون مغتربون في إنجلترا
رياضيون هولنديون من أصل غاني
لاعبو الدوري الجنوبي لكرة القدم
لاعبو الدوري الوطني (كرة القدم الإنجليزية)
لاعبو دوري الدرجة الأولى الإنجليزي
لاعبو دوري كرة القدم الإسكتلندي للمحترفين
لاعبو ريث روفرز
لاعبو كرة قدم مغتربون في إنجلترا
لاعبو كرة قدم من أمستردام
لاعبو كرة قدم هولنديون
لاعبو كرة قدم هولنديون مغتربون
لاعبو نادي إنفرنيس
لاعبو نادي بارنيت
لاعبو نادي تشيلتنهام تاون لكرة القدم
لاعبو نادي توركي يونايتد
لاعبو نادي يورك سيتي
مهاجمو كرة قدم رجالية
هولنديون من أصل غاني | 20,028 |
https://pl.wikipedia.org/wiki/Choux%20%28Jura%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Choux (Jura) | https://pl.wikipedia.org/w/index.php?title=Choux (Jura)&action=history | Polish | Spoken | 54 | 133 | Choux – miejscowość i gmina we Francji, w regionie Burgundia-Franche-Comté, w departamencie Jura.
Według danych na rok 1990 gminę zamieszkiwało 135 osób, a gęstość zaludnienia wynosiła 16 osób/km² (wśród 1786 gmin Franche-Comté Choux plasuje się na 608. miejscu pod względem liczby ludności, natomiast pod względem powierzchni na miejscu 531).
Bibliografia
Miejscowości w departamencie Jura | 14,182 |
https://war.wikipedia.org/wiki/Alphamenes%20insignis | Wikipedia | Open Web | CC-By-SA | 2,023 | Alphamenes insignis | https://war.wikipedia.org/w/index.php?title=Alphamenes insignis&action=history | Waray | Spoken | 37 | 70 | An Alphamenes insignis in uska species han Hymenoptera nga syahan ginhulagway ni Fox hadton 1899. An Alphamenes insignis in nahilalakip ha genus nga Alphamenes, ngan familia nga Eumenidae. Nag-uusahan nga subspecies: A. i. loquax.
Mga kasarigan
Alphamenes | 16,287 |
https://en.wikipedia.org/wiki/Odesskoye | Wikipedia | Open Web | CC-By-SA | 2,023 | Odesskoye | https://en.wikipedia.org/w/index.php?title=Odesskoye&action=history | English | Spoken | 28 | 57 | Odesskoye () is a rural locality (a selo) and the administrative center of Odessky District, Omsk Oblast, Russia. Population:
Climate
References
Notes
Sources
Rural localities in Omsk Oblast | 13,396 |
https://stackoverflow.com/questions/10248412 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | CMS_Martyr, Pranay Reddy, VINE MADUKPE , WuLiu, bio, https://stackoverflow.com/users/1157345, https://stackoverflow.com/users/23513800, https://stackoverflow.com/users/23513801, https://stackoverflow.com/users/23513802, https://stackoverflow.com/users/23521115, https://stackoverflow.com/users/23521455, keerti | English | Spoken | 419 | 1,000 | isBeingDismissed not set in viewWillDisappear:
I have some code to clean up in my viewWillDisappear:, which I only want to use when the view is moving back to the parent view controller.
- (void)viewWillDisappear:(BOOL)animated
{
if ([self isMovingFromParentViewController] || [self isBeingDismissed]) {
NSLog(@"isMovingFromParentViewController or isBeingDismissed");
// clean up
}
[super viewWillDisappear:animated];
}
The view can be presented in two ways: it can be pushed by a navigation controller, or presented as a modal view controller (from the same navigation controller). If it's pushed, then popped (pressing the back button), my clean-up code runs. If it it presented as a modal view controller, then dismissed, the code doesn't run.
I dismiss like so:
[rootViewController dismissModalViewControllerAnimated:YES];
My question is: why isn't isBeingDismissed set when I dismiss my view controller?
Your issue is how you are dismissing your modal view. How is rootViewController being defined?
When I call [self dismissModalViewControllerAnimated:YES] then [self isBeingDismissed] evaluates to true.
When I call [parentViewController dismissModalViewControllerAnimated:YES] then [self isBeingDismissed] evaluates to true, whereby parentViewController is the UIViewController that presented the modal view (note: not a UINavigationController).
I can confirm that isBeingDismissed() returns false when the viewController is supposedly popped from a UINavigationController, such as the detail viewController in a collapsed UISplitViewController.
If this is the first view controller in a modal navigation controller that's being dismissed, calling self.isBeingDimissed() from viewWillDisappear: returns false.
However, since the entire navigation controller is being dismissed, what actually works is self.navigationController?.isBeingDismissed(), which returns true.
As @Yuval Tal mentioned, this flag does not work when you're dismissing controller that is embeded inside navigation controller. Here's an extension that I use:
extension UIViewController
{
var isAboutToClose: Bool {
return self.isBeingDismissed ||
self.isMovingFromParent ||
self.navigationController?.isBeingDismissed ?? false
}
}
It can be easily extended when you find another case when standard .isBeingDismissed won't work. And if you find, let us, let me know in comments.
If by some chance you came here trying to use isBeingDismissed on a non-modally presented view controller, you can always check the topViewController property of your navigationController, for instance:
if navigationController?.topViewController != self {
return
}
viewController.isBeingPresented == NO;
[rootVC presentViewController:viewController animated:NO completion:^{
viewController.isBeingPresented == NO;
viewController.isBeingDismissed == NO;
[viewController dismissViewControllerAnimated:NO completion:^{
viewController.isBeingDismissed == NO;
}];
viewController.isBeingDismissed == NO; // is not work
}];
viewController.isBeingPresented == YES; // is work
viewController.isBeingPresented == NO;
[rootVC presentViewController:viewController animated:NO completion:^{
viewController.isBeingPresented == NO;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
viewController.isBeingDismissed == NO;
[viewController dismissViewControllerAnimated:NO completion:^{
viewController.isBeingDismissed == NO;
}];
viewController.isBeingDismissed == YES; // is work
});
}];
viewController.isBeingPresented == YES; // is work
| 25,119 |
https://ceb.wikipedia.org/wiki/K%C5%ABh-e%20Qar%C4%81vol%20%28kabukiran%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Kūh-e Qarāvol (kabukiran) | https://ceb.wikipedia.org/w/index.php?title=Kūh-e Qarāvol (kabukiran)&action=history | Cebuano | Spoken | 112 | 213 | Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Kūh-e Qarāvol.
Kabukiran ang Kūh-e Qarāvol (Pinulongang Persiyano: Kūhha-ye Kalāntar, کوه قراول) sa Iran. Nahimutang ni sa lalawigan sa Ostān-e Ardabīl, sa amihanan-kasadpang bahin sa nasod, km sa amihanan-kasadpan sa Tehrān ang ulohan sa nasod.
Ang klima mediteranyo. Ang kasarangang giiniton °C. Ang kinainitan nga bulan Agosto, sa °C, ug ang kinabugnawan Enero, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Mayo, sa milimetro nga ulan, ug ang kinaugahan Agosto, sa milimetro.
Ang mga gi basihan niini
Kabukiran sa Ostān-e Ardabīl
Kabukiran sa Iran nga mas taas kay sa 2000 metros ibabaw sa dagat nga lebel | 49,468 |
https://stackoverflow.com/questions/34366477 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | https://stackoverflow.com/users/4639336, https://stackoverflow.com/users/720999, kostix, reticentroot | Friulian | Spoken | 436 | 786 | golang save file to desktop
I'm trying to saving files to my desktop, however whenever I run my script it saves the file in whatever directory the go script is located in.
This is the chunk of code i'm working with
func (d *downloader) downloadToFile(key string) {
// Create the directories in the path
// desktop path
desktop := "Desktop/" + d.dir
file := filepath.Join(desktop, key)
if err := os.MkdirAll(filepath.Dir(file), 0775); err != nil {
panic(err)
}
// Setup the local file
fd, err := os.Create(file)
if err != nil {
panic(err)
}
defer fd.Close()
// Download the file using the AWS SDK
fmt.Printf("Downloading s3://%s/%s to %s...\n", d.bucket, key, file)
params := &s3.GetObjectInput{Bucket: &d.bucket, Key: &key}
d.Download(fd, params)
_, e := d.Download(fd, params)
if e != nil {
panic(e)
}
}
I've tried the path
desktop := "Desktop/" + d.dir
desktop := "/Desktop/" + d.dir
desktop := "Desktop/" + d.dir
desktop := "~/Desktop/ + d.dir
I can't seem to get the files to save to the desktop, for instance when i tried
desktop := "~/Desktop/ + d.dir
A directory ~ was created, inside of ~ Desktop was created, inside of Desktop the d.dir was created, and in there all the files. Again I want to run the script an no matter where I run it I want to d.dir folder with it's contents so be created on the desktop.
You can find current user profile using this function - https://godoc.org/os/user#Current
So, depending on your OS, desktop will be in corresponding folder in home directory.
something like this
myself, error := user.Current()
if error != nil {
panic(error)
}
homedir := myself.HomeDir
desktop := homedir+"/Desktop/" + d.dir
also it is worth notice, that there is a github.com/mitchellh/go-homedir
library that is a Go library for detecting the user's home directory without the use of cgo, so the library can be used in cross-compilation environments.
So using it can be better to make your program more portable.
Awesome thank you. I'm still learning the core library. I've been working with python.
@msanti, not that this will break in some future Windows version when it will decide to rename "Desktop" to something else. The real way to go it to use the "special folders" facility of the Windows shell integration API to get the location of the desktop folder on the Windows your program is running on. Unfortunately this requires certain skills in C, Windows API and calling it from Go (the latter is easy). I'd ask a question on the go-nuts mailing list.
Oh it's fine. I'm a Linux, Unix user and that's where this script will remain lol
| 47,558 |
https://stackoverflow.com/questions/31922359 | StackExchange | Open Web | CC-By-SA | 2,015 | Stack Exchange | Przemek, https://stackoverflow.com/users/2784384, https://stackoverflow.com/users/3937447, wilson | English | Spoken | 123 | 319 | Gravity Forms. View, Approvals plugin
I have code like this:
add_filter( 'gform_entries_field_value', 'sh_filter_gform_entries_field_value', 9, 4 );
function sh_filter_gform_entries_field_value( $value, $form_id, $field_id, $entry ) {
$translated_value = $value;
if ( $field_id == 'approval_status' ) {
switch ( $value ) {
case 'pending' :
$translated_value = esc_html__( 'Oczekująca', 'gravityformsapprovals' );
break;
case 'approved' :
$translated_value = esc_html__( 'Zatwierdzona', 'gravityformsapprovals' );
break;
case 'rejected' :
$translated_value = esc_html__( 'Odrzucona', 'gravityformsapprovals' );
break;
}
}
return $translated_value;
}
It's showing translated values of fields: pending, approved, rejected.
What i want is to make it also work in Gravity View, actualy it's not showing those values.
You can try same things, but in the view. Or pass an array to your controller
Can you help me do that?
| 50,741 |
https://drupal.stackexchange.com/questions/125224 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Adam Balsam, Andy, https://drupal.stackexchange.com/users/11462, https://drupal.stackexchange.com/users/33640, https://drupal.stackexchange.com/users/633, jordan | English | Spoken | 310 | 390 | Drupal 6 - How to programatically create a content type
I am creating a module to display a dashboard that shows various stats. One section will be for adding announcements. My thought is that the best way to do this would be to create a custom content type and then pull in the latest announcements from the announcement content type submissions.
My question is how can I create that content type programatically with the proper fields? Where can I go to add those announcements once the type is created? And how can I pull the latest announcements to display on the page?
I'm new to Drupal, so I'm struggling at the moment to learn the proper way to do things.
Possible duplicate of How to create content type programatically. That answer is for Drupal 7, but the same function is available in Drupal 6. There is also this question: How do I programmatically create a new content type?
@AdamBalsam The first link you posted doesn't give much information other than a link to the documentation. I'm looking for some examples that will fit my situation. The second one doesn't even have a correct answer, rather a suggestion to use a third party module to solve the issue (not what I want to do).
For examples you can look at core itself and also the Examples for developers project.
You can use the Features module to export out the content type and the fields associated with it. Once you have done this you will have a .tar or .zip file of the export code in a functional module.
From here you are able to move that directory into your sites/all/modules directory and have a fully functional module.
Do remember to remove your content type and fields, before installing the module on your site. The new module will recreate them for you.
| 5,546 |
https://ceb.wikipedia.org/wiki/Frey%20%28awtor%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Frey (awtor) | https://ceb.wikipedia.org/w/index.php?title=Frey (awtor)&action=history | Cebuano | Spoken | 22 | 49 | Si Frey nga ang hamubong pangalan niini nag tudlo kang:
Eberhard Frey
Eduard Frey
Heinrich Frey
Richard Frey
Wolfgang Frey
Mga awtor | 794 |
https://de.wikipedia.org/wiki/Barry%20Sheene | Wikipedia | Open Web | CC-By-SA | 2,023 | Barry Sheene | https://de.wikipedia.org/w/index.php?title=Barry Sheene&action=history | German | Spoken | 1,007 | 1,918 | Barry Stephen Frank Sheene MBE (* 11. September 1950 in London, England; † 10. März 2003 in Australien) war ein britischer Motorradrennfahrer. 1976 und 1977 war er Weltmeister in der 500-cm³-Klasse.
Leben
Barry Sheene wurde in der Gray’s Inn Road in Bloomsbury, London, als zweites Kind von Frank und Iris Sheene geboren. Sein Vater war Ingenieur am Royal College of Surgeons und selbst ein erfahrener Motorradfahrer, Mechaniker und ehemaliger Rennfahrer. Er wuchs in Queen Square, Holborn, London, auf. Vor dem Beginn seiner Motorsport-Karriere arbeitete Sheene als Bote und Lieferfahrer.
Sheene genoss einen verschwenderischen Lebensstil. Privat war er als Partylöwe bekannt und verkehrte mit Freunden wie James Hunt, Ringo Starr und George Harrison. Er trank viel und war Kettenraucher, in den Kinnbügel seines Integralhelms hatte er ein Loch gebohrt, sodass er bis kurz vor dem Start eines Rennens rauchen konnte.
Sheene war bekannt für seine unverblümte Kritik an Rennstrecken, die er für gefährlich hielt, insbesondere am Snaefell Mountain Course auf dem die Isle of Man TT ausgetragen wurde, und den er für zu gefährlich für die Austragung eines Weltmeisterschaftslaufes hielt.
Nach seiner Heirat mit dem britischen Model Stefanie McLean wurde er ruhiger und ging nach Australien, vor allem wegen des Klimas, da er an Arthritis litt. Nach seiner Rennzeit wurde er ein erfolgreicher Geschäftsmann im Bereich Immobilienentwicklung, und arbeitete als Motorport-Kommentator.
Im Juli 2002, im Alter von 51 Jahren, wurde bei Sheene Speiseröhren- und Magenkrebs diagnostiziert. Sheene lehnte eine konventionelle Behandlungen mit Chemotherapie ab und entschied sich stattdessen für einen ganzheitlichen Ansatz mit einer strengen Diät, die vom österreichischen „Heilpraktiker“ Rudolf Breuss entwickelt wurde und darauf abzielte, dem Krebs die Nahrung (Grundlage) zu entziehen. Er starb Im März 2003 im Alter von 52 Jahren in einem Krankenhaus im Bundesstaat Queensland. Er hinterließ zwei Kinder.
Chris Vermeulen, dessen Freund und Förderer Sheene war, startete 2008 und 2009 im Gedenken an ihn mit seiner Startnummer, der Nummer 7.
Sportliche Laufbahn
1968 begann Sheene mit Motorradrennen auf den alten 125er und 250er Bultaco-Maschinen seines Vaters (der seine Karriere 1656 beendet hatte), und gewann erste Rennen in Brands Hatch.
1969 belegte er mit seiner 125er-Bultaco in einer nationalen Rennserie den zweiten Platz hinter Chas Mortimer.
1970 wurde Sheene im Alter von 20 Jahren britischer Meister in der 125-cm³-Klasse. Er hatte für 2000 Britische Pfund eine ehemalige Suzuki Werksmaschine (eine Zweizylinder RT67) gekauft, die zuvor von Stuart Graham gefahren wurde. Ein erster internationaler Achtungserfolg war der zweite Platz beim GP von Spanien.1971 wurde er mit der Suzuki RT67 Zweiter in der 125er-Weltmeisterschaft, wobei er den Titel wahrscheinlich nur verpasste, weil er sich in Rennen, die nicht zur Meisterschaft zählten (Hengelo / Niederlande und Mallory Park) Verletzungen zugezogen hatte. Seinen ersten Grand-Prix-Sieg errang er in Belgien. Kurz darauf folgte der Sieg in der 50-cm³-Klasse auf einer Van Veen Kreidler beim Großen Preis der Tschechoslowakei auf dem Masaryk-Ring, wo er mit über zweieinhalb Minuten vor dem Zweitplatzierten Herman Meijer (NED / auf Jamathi) ins Ziel kam.
1972 bekam Sheene von Yamaha eine werksunterstützte Yamaha YZ635 für die 250er-Weltmeisterschaft. Damals hatte Yamaha kein eigenes Rennteam, aber Sheene war einer von sechs Fahrern, die Unterstützung vom Werk erhielten. Beim Grand Prix der Nationen in Imola Ende Mai, stürzte er im Training und brach sich das Schlüsselbein, was ihn daran hinderte, am Rennen teilzunehmen. Auch für die Isle of Man TT und die nächsten sieben Rennen der WM, die alle kurz hintereinander im Juni und Juli stattfanden war Sheene nicht fit für die Teilnahme.
1973 pausierte er in der regulären Weltmeisterschaft und gewann den Preis der FIM in der Formel 750 auf Suzuki TR 750. In Silverstone tauschte Sheene zwischen den beiden Läufen sein Motorrad. Er wurde daraufhin für den zweiten Lauf von der Wertung ausgeschlossen und verlor damit die acht Punkte für Rang drei. Die nachfolgenden Fahrer wurde jeweils um einem Platz heraufgestuft. In Hockenheim wurde die ursprüngliche Wertung, nach der die Addition der Zeiten der beiden Läufe für die Punkteverteilung herangezogen wurde, von Suzuki angefochten. Daraufhin wurde ein neues System angewandt, das Punkte für jeden Lauf vergab, deren Addition die Gesamtwertung ergab. Erwähnenswert ist, dass er in der gesamten Historie der Serie der einzige Champion war, der nicht auf Yamaha antrat.
1974 stellte Suzuki Sheene eine RG500 zur Verfügung, mit der er einen zweiten, dritten und vierten Platz belegte, 30 Punkte erzielte und den sechsten Platz in der Weltmeisterschaft holte. Im gleichen Jahr gewann er das prestigeträchtige, nicht zur WM zählende, Mallory Park Race of the Year auf einer 750er Suzuki.
In den Jahren 1976 und 1977 war Sheene Weltmeister in der 500er-Klasse auf Suzuki RG 500. Nach weiteren erfolgreichen Jahren bei den 500ern zog er sich 1984 aus dem Grand-Prix-Sport zurück.
Fahrstil
Sheene gilt als Mitbegründer einer neuen Fahrtechnik. Nachdem sein Landsmann Paul Smart zu Beginn der 1970er begann, sich aus Angst vor Stürzen mit dem Körper in die Kurve hineinzulegen, verfeinerte er diese Körperhaltung hin zum Hanging Off. Sheene kann somit als Erfinder dieses bis heute den Rennsport dominierenden Fahrstils gelten.
Statistik
Komplette Ergebnisse: Motorrad-Weltmeisterschaft (alle Klassen)
Das Punktesystem ab 1969:
(Resultate in Fettdruck bedeuten Pole Position; Resultate in Kursiv zeigen „Schnellste Runde“)
Ergebnisse: „Großer Preis der FIM“ (Formel 750)
Die Punktevergabe war identisch mit der Weltmeisterschaft. Nur die besten vier Ergebnisse eines Fahrers zählten für die Meisterschaft. Gesamtpunktzahl in Klammern.
Erfolge (überblick)
1971 – 125-cm³-Vize-Weltmeister auf Suzuki
1973 – Formel-750-Meister auf Suzuki
1974 – Sieger des Mallory Park Race of the Year auf Suzuki
1975 – Sieger des Mallory Park Race of the Year auf Suzuki
1975 – Formel-750-Vize-Meister auf Suzuki
1976 – 500-cm³-Weltmeister auf Suzuki
1977 – 500-cm³-Weltmeister auf Suzuki
1978 – 500-cm³-Vize-Weltmeister auf Suzuki
1978 – Sieger des Mallory Park Race of the Year auf Suzuki
1979 – 500-cm³-WM-Dritter auf Suzuki
23 Grand-Prix-Siege
Ehrungen
Aufnahme in die MotoGP Hall of Fame
Literatur
Andrew Marriott: Barry Sheene und seine Welt: vom Laufburschen zum Weltmeister. Motorbuch-Verlag, Stuttgart 1981, ISBN 3-87943-794-7.
Weblinks
Porträt von Barry Sheene
Barry Sheene World Champion Sehr ausführliche Videoreportage mit zeitgenössischen Aufnahmen und Interviews. Auf YouTube. (englisch)
Einzelnachweise
Motorrad-Rennfahrer (Vereinigtes Königreich)
500-cm³-Weltmeister
Formel-750-Weltmeister
Engländer
Brite
Geboren 1950
Gestorben 2003
Mann | 4,617 |
https://stackoverflow.com/questions/76093070 | StackExchange | Open Web | CC-By-SA | 2,023 | Stack Exchange | English | Spoken | 114 | 150 | How to get the environment at execution for FastReport
We are using FastReport with our on-premise ERP software.
Reports are designed with the FastReport Desktop (version 2021.4.15).
The reports are executed from within the ERP client which runs in the browser.
As we have multiple instances of the ERP (Dev, Test, Training, Production, ...) we need to include the environment in which a report is being executed.
I have looked at using the Report or Engine classes but I can't find any property or method that could give me a hint: I would be happy if I could retrieve the URL or server name or just anything that could help in distinguishing the environment.
| 22,538 | |
https://stackoverflow.com/questions/42519425 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Brad, Heretic Monkey, Liberal Tears Drinker, RomanPerekhrest, dokgu, https://stackoverflow.com/users/215552, https://stackoverflow.com/users/3185459, https://stackoverflow.com/users/4322884, https://stackoverflow.com/users/5530965, https://stackoverflow.com/users/6019903, https://stackoverflow.com/users/7637994, mike510a | English | Spoken | 913 | 2,205 | Select first half of text inside anchor tag using jQuery
Is there a way to target the first half of the text inside an anchor tag using jQuery?
For example, I have these anchor tags.
<a href="">Go to Meeting Center</a> <!-- / target 'Go to' -->
<a href="">Our Departments</a> <!-- / target 'Our' -->
I'd also like to wrap them inside a span tag.
The result should be:
<a href=""><span>Go to</span> Meeting Center</a> <!-- / target 'Go to' -->
<a href=""><span>Our</span> Departments</a> <!-- / target 'Our' -->
It will be applied to all my anchor tags on my website.
show how should look the expected result
What does "first half" mean? Because your examples are not "half" by any measure I know of.
Yes, you can simply place a <span> element inside of the <a> element like this:
<a href=""><span id="firsthalf">Go to</span> Meeting</a> then call $("#firsthalf") to select it with jQuery
@MikeMcCaughan I think OP is referring to the number of words instead of characters.
I just updated the question. By half, I mean the number of words inside the anchor tag divided by two. So if you have 4 words, it should target the first two words. If you have six words, it should target the first three words.
@LiberalTearsDrinker What about 5 words?
@uom-pgregorio, good question. I think it should just target the first or first and second words. The reason I want to target half of the text is so I could style them differently.
@LiberalTearsDrinker Ok check my answer.
You could do this:
var text = $("a").text().split(" ");
var half_of_text = text.splice(0, Math.floor(text.length/2)).join(" ");
You will need to use this in a loop to go through all tags as this on its own only does the first one.
I was assuming in the case that they were targeting just the one. It would be very easy to implement with as many as you want. The exact same concept for that matter
The code below loops through all a tags, finds the half text you want (using this answer) and then creates the span with this half text and puts it in the spans div I created for the spans.
Check this JSFiddle.
HTML
<a href="">Go to Meeting Center</a> <!-- / target 'Go to' -->
<a href="">Our Departments</a> <!-- / target 'Our' -->
<div id="spans"></div>
JavaScript/JQuery
$('a').each(function(i, ele) {
text = $(this).text().split(" ");
half_of_text = text.splice(0, Math.floor(text.length/2)).join(" ");
span = $(document.createElement('span'));
span.html(half_of_text);
$('#spans').append(span);
$('#spans').append(document.createElement('br'));
});
$("a").each(function(){
console.log($(this).text().substr( 0 ,$(this).text().length/2));
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<a href="">Go to Meeting Center</a>
<a href="">Our Departments</a>
"First half" is a very subjective term.
I fear you will have to code this by yourself,
a very basic approach :
//assuming this is your query string
var text = "Go to Meeting Center";
//split string into an array
var terms = text.split(" ");
//looking for an approximate value the center of the text
var half = Math.ceil(terms.length/2);
//first "half" of query
var selected = terms.splice(0, half).join(" ");
console.log(selected);
You need to decide where is the middle by your own definition, but here is a way to detect the middle with the number of words. You'd get a span around a single word as well with this solution.
You first need to get the text inside the link and use the split function which creates an array from a string according to the separator passed in the argument.
Then, you create a span element containing those words you just replaced and you replace the text inside the link with that span.
var links = document.querySelectorAll('a');
[].forEach.call(links, function(link_el){
var text_inside = link_el.innerText;
var words = text_inside.split(' ');
var words_half = Math.ceil(words.length/2);
var span_element = document.createElement('span');
var words_string = words.splice(0, words_half).join(' ');
link_el.innerText = link_el.innerText.replace(words_string, '');
span_element.innerText = words_string;
link_el.prepend(span_element);
});
<a href="">Go to Meeting Center</a> <!-- / target 'Go to' -->
<a href="">Our Departments</a> <!-- / target 'Our' -->
<a href="">Contact</a> <!-- / target 'Contact' -->
Use the following approach:
$('a').each(function(i, el){
var parts = $(el).text().split(' '); // splitting anchor text into chunks
$(el).html("<span>"+ parts.splice(0, Math.ceil(parts.length/2)).join(" ") +"</span> " + parts.join(" "));
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="">Go to Meeting Center</a> <!-- / target 'Go to' -->
<a href="">Our Departments</a>
Used functions:
JQuery .each()
String.prototype.split() (to split anchor text into chunks)
Array.prototype.splice() (to extract the first half of the text)
Array.prototype.join()
Check this Fiddle
HTML
<a href="">Go to Meeting Center</a> <!-- / target 'Go to' -->
<a href="">Our Departments</a> <!-- / target 'Our' -->
jQuery
$(document).ready(function() {
$.each($("a"), function(index, element) {
var text = $(element).text().split(" ");
text = text.splice(0, Math.floor(text.length/2)).join(" ");
$(element).html($(element).text().replace(text, "<span>" + text + "</span>"))
});
});
CSS
a {
display: block;
}
span {
color: red !important;
}
NOTE:
If you want to round down use floor, otherwise use ceil.
You can use some of the code provided in other answers to create an easy-to-use approach for applying this to all links site-wide
(see snippet)
function get_first_half(element) {
var text = $(element).text().split(" ");
var half_of_text = text.splice(0, Math.floor(text.length / 2)).join(" ");
return half_of_text;
}
function get_back_half(element) {
var text = $(element).text().split(" ");
var half_of_text = text.slice(Math.floor(text.length / 2), Math.floor(text.length)).join(" ");
return half_of_text;
}
$(document).ready(function() {
$("a").each(function(elem) {
var first_half = get_first_half(this);
var back_half = get_back_half(this);
$(this).html("<span>" + first_half + "</span>" + back_half);
});
});
span {
font-size: 2.0em;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="">Goto Meeting</a>
<br>
<a href="">Our Departments</a>
You can try this:
var t = $('a').text();
var middle= '';
for(var i =0; i<Math.floor(t.length/2);i++){
middle+=t.char(i);
}
console.log(middle);
PS: This has not been tested and is done only to illustrate
| 42,559 |
https://stackoverflow.com/questions/5055003 | StackExchange | Open Web | CC-By-SA | 2,011 | Stack Exchange | Gotjosh, J-Besna, Kaz Jason, Pablo Barbosa, Sudantha , https://stackoverflow.com/users/10750502, https://stackoverflow.com/users/10750503, https://stackoverflow.com/users/10750504, https://stackoverflow.com/users/10750538, https://stackoverflow.com/users/214038, https://stackoverflow.com/users/296231, kalpana Prasad | English | Spoken | 149 | 195 | Redirect to a spanish or english version of my rails app?
I have a rails app, with 2 version english and spanish version. Using I18n, what's the optimal way of determining the user's location and redirecting to the proper spanish or english version depending on where's currently based?
Perhaps google map API?
I think most of the users are not have positioning devices in their desktops and laptops so some time getting location using Google Maps API will fail.
best way is using the IP address.Get the user IP address and check which IP pool belongs to and you can determine the country.
determining the user's country or location is not he problem, the actual problem is knowing which is the default language (or main language) for each country. So you can actually know where do redirect.
do you have multiple countries ? .. except for english and spanish
| 46,231 |
https://stackoverflow.com/questions/56501730 | StackExchange | Open Web | CC-By-SA | 2,019 | Stack Exchange | English | Spoken | 427 | 1,123 | Microsoft Azure > Web App -- SQL Connection was forcibly closed by the remote host -- Happens only for the first call after idle time
This is happening on MS Azure application setup while connecting to SQL MI instance. Traffic flows through the HCM.
The same code works on-prem setup where web application directly queries SQL server 201.
"This issue is reproducible if we keep the application idle for a few minutes and retrigger any request which has database interaction". Once the below error is logged, subsequent requests work fine.
Below Error is logged:
Properties:
SqlException.Errors = {
"System.Data.SqlClient.SqlError: A connection was successfully established with the server, but then an error occurred during the pre-login handshake.
(provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)",
}
SqlException.ClientConnectionId = "4560-9ca8-53ea0fdeca60"
SqlException.Class = "20"
SqlException.LineNumber = "0"
SqlException.Number = "10054"
SqlException.Procedure = ""
SqlException.Server =""
SqlException.State = "0"
SqlException.Source = ".Net SqlClient Data Provider"
SqlException.ErrorCode = "-2146232060"
Data:
HelpLink.ProdName = "Microsoft SQL Server"
HelpLink.EvtSrc = "MSSQLServer"
HelpLink.EvtID = "10054"
HelpLink.BaseHelpUrl = "http://go.microsoft.com/fwlink"
HelpLink.LinkId = "20476"
MS_LoggedBy = "System.Collections.Generic.List`1[System.Object]"
Stack Trace:
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
I have tried using documentation available on the internet, MSDN,
a. I started logging in-detail System.Net logs for HCM. But no issue found at the socket level. Below exception is logged in Event Viewer
HybridConnectionManager Trace: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
b. Considering it may be tcp connection dropping, I tried making connection pool =False.
c. Verified if the connection is being disposed of. Code is written in Using block and disposed has been defined.
I have resolved this.
This is due to connection drops. We need to use the connection retry mechanism.
a. Use Enterprise library Transient error blocks
b. Define retry policy
c. Change ado.net connection from SqlConnection to ReliableSqlConnection
| 16,254 | |
https://en.wikipedia.org/wiki/Skilly%20Peak | Wikipedia | Open Web | CC-By-SA | 2,023 | Skilly Peak | https://en.wikipedia.org/w/index.php?title=Skilly Peak&action=history | English | Spoken | 83 | 125 | Skilly Peak () is a conspicuous rock peak northeast of Shiver Point and northeast of Eduard Nunatak on the east coast of Graham Land, Antarctica. It surmounts Rogosh Glacier to the north and Artanes Bay to the southeast.
The peak was surveyed by Falkland Islands Dependencies Survey (FIDS) in 1947 and 1955. "Skilly" means a thin soup; the name arose because the 1955 FIDS party was short of rations, and pemmican and porridge were very thin.
Mountains of Graham Land
Oscar II Coast | 8,232 |
https://stackoverflow.com/questions/2373007 | StackExchange | Open Web | CC-By-SA | 2,010 | Stack Exchange | Eric, Kristijan, Program.X, Ryan Dingle, gkraynov, https://stackoverflow.com/users/4823009, https://stackoverflow.com/users/4823010, https://stackoverflow.com/users/4823011, https://stackoverflow.com/users/4823644, https://stackoverflow.com/users/4824591, https://stackoverflow.com/users/76037, jinx | English | Spoken | 290 | 599 | Silverlight equivalent of OnDataItemBound() for ListBox
I have a ListBox in Silverlight that has a list of items inside. Each item has a certain number of additional options, the availability of which depends on the each item.
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" />
<Button HorizontalAlignment="Right" x:Name="editDiarySecurityButton">
<Image Source="/xxx.yyy.Silverlight.Common;Component/Resources/Images/Icons/Ribbon/Small/editSecurity.png" Width="16" Height="16" />
</Button>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
The Button editDiarySecurityButton should be handled according to whether that item (representing a Diary) has Security applied to it, or not. I would probably just modify the opacity of the image to reflect this.
My question is how can I achieve this? In ASP.NET, I'd have attached to the ItemDataItemBound event, but I don't think this is available in WPF/Silverlight.
Since you asked specifically about the Opacity property, bind the Button's Opacity property to a property on your DataContext that returns a double. Add whatever logic you need to the property to return the Opacity you desire for that item. Something like this:
<Button HorizontalAlignment="Right" x:Name="editDiarySecurityButton"
Opacity="{Binding Path=ButtonOpacity, Mode=OneWay}">
<Image Source="/xxx.yyy.Silverlight.Common;Component/Resources/Images/Icons/Ribbon/Small/editSecurity.png" Width="16" Height="16" />
</Button>
Then on your DataContext:
public double ButtonOpacity
{
get {return _buttonOpacity; }
}
Use the same idea with any other property of the Button you want to control.
Thanks. You know, I'm still getting into this WPF lark. I never actually thought of it this way. Guess the best way would be to sub-class my data. Though as my class is a DTO from EF/WCF, I guess I may just have to wrap it. Unfortunately, I can only choose one answer!
If I understand what you're asking, you'll want to expose a property on the object and use that to present your elements as necessary. ie to disable the button you might use something like IsEnabled="{Binding HasSecurity}".
| 19,457 |
https://it.wikipedia.org/wiki/Jack%20Conan | Wikipedia | Open Web | CC-By-SA | 2,023 | Jack Conan | https://it.wikipedia.org/w/index.php?title=Jack Conan&action=history | Italian | Spoken | 347 | 611 |
Biografia
Conan cominciò a giocare a rugby nella St Gerard's School, istituto della sua città natale. Nel 2012 entrò a far parte dell'accademia giovanile del e, nella stessa stagione, iniziò a militare nel , dove rimase due anni. Fece il suo esordio professionistico, segnando una meta, nella partita contro valida per la quindicesima giornata del Pro12 2013-2014, torneo poi vinto dalla franchigia irlandese. L'annata successiva debuttò anche nelle coppe europee giocando contro i nell'European Rugby Champions Cup 2014-2015. Conquistò rapidamente la titolarità e venne premiato come miglior numero otto della stagione di Pro14 per due volte consecutive nel 2016-2017 e nel 2017-2018. In quest'ultima annata si aggiudicò con Leinster il double Pro14 e Champions Cup. Tra il 2018 e il 2021 vinse tre titoli consecutivi nel Pro14.
A livello internazionale, Conan disputò il Campionato mondiale giovanile di rugby 2012 con la selezione irlandese di categoria. Ricevette la sua prima chiamata con l' in occasione del Sei Nazioni 2015, ma non ottenne nessuna presenza nel torneo. Incluso nella squadra per preparare la , fece il suo debutto nell'incontro amichevole contro la , ma non fu convocato per il mondiale. Tornò in nazionale due anni dopo in occasione del tour estivo del 2017, dove giocò da titolare tutte le sfide segnando la sua prima meta internazionale contro gli . Nella stagione successiva prese parte al Sei Nazioni 2018 vinto dall'Irlanda conseguendo il Grande Slam. Convocato per la , scese in campo solo nella partita inaugurale con la Scozia poiché una frattura al piede lo estromise dalla competizione. Questo ed altri infortuni lo tennero lontano dalla nazionale fino al Sei Nazioni 2021 dove disputò tre incontri. Nella stessa stagione, il commissario tecnico Warren Gatland lo incluse nella selezione per il tour dei British and Irish Lions, dove giocò sette partite tra cui tutti e tre i test-match contro il . Nelle successive due annate mancò un solo incontro tra quelli disputati dalla nazionale irlandese e conquistò una seconda volta il Grande Slam nel Sei Nazioni 2023.
Palmarès
Leinster: 2013-14, 2017-18, 2018-19, 2019-20, 2020-21
Leinster: 2017-18
Note
Altri progetti
Collegamenti esterni | 11,667 |
https://nl.wikipedia.org/wiki/Emeka%20Eze | Wikipedia | Open Web | CC-By-SA | 2,023 | Emeka Eze | https://nl.wikipedia.org/w/index.php?title=Emeka Eze&action=history | Dutch | Spoken | 90 | 157 | Emeka Christian Eze (22 december 1992) is een Nigeriaans voetballer. Hij speelt sinds 2012 voor de Nigeriaanse club Enugu Rangers. In 2013 debuteerde hij in het Nigeriaans voetbalelftal in een wedstrijd tegen Mexico.
In 2013 werd Eze opgenomen in de selectie van Nigeria voor de FIFA Confederations Cup, waar hij niet aan speelminuten kwam en het team in de eerste ronde werd uitgeschakeld. Op 6 juli 2013 speelde Eze zijn tweede en laatste interland in het kwalificatietoernooi voor het African Championship of Nations 2014 tegen Ivoorkust (4–1 winst).
Nigeriaans voetballer | 35,329 |
https://arz.wikipedia.org/wiki/%D9%85%D8%AA%D8%AD%D9%81%20%D8%B1%D9%88%D8%AF%D9%88%D9%84%D9%81%20%D8%AA%D9%8A%D8%AC%D9%86%D8%B1 | Wikipedia | Open Web | CC-By-SA | 2,023 | متحف رودولف تيجنر | https://arz.wikipedia.org/w/index.php?title=متحف رودولف تيجنر&action=history | Egyptian Arabic | Spoken | 26 | 99 | متحف رودولف تيجنر (Rudolph Tegner Museum) متحف فى دنمارك.
تاريخ
متحف رودولف تيجنر اتأسس سنة 1938 فى جريبسكوڤ مونيسيپاليتى
لينكات برانيه
مصادر
متاحف
متاحف فى دنمارك | 29,669 |
https://stackoverflow.com/questions/72581932 | StackExchange | Open Web | CC-By-SA | 2,022 | Stack Exchange | DuncG, Harald K, Rotem, d0nut, https://stackoverflow.com/users/1428606, https://stackoverflow.com/users/14334886, https://stackoverflow.com/users/4222206, https://stackoverflow.com/users/4712734, https://stackoverflow.com/users/4926757, queeg | English | Spoken | 1,140 | 2,080 | Why is the color of my image changed after writing it as a jpg file?
I'm currently making a method that converts a ppm file to a jpg, png, and bmp file. The way I did it is reading the content of a ppm file, creating a BufferedImage, and assigning each pixel from the ppm file to the corresponding pixel in the BufferedImage. My bmp and png files look correct. However, the jpg file looks completely different.
Below is my code:
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import javax.imageio.ImageIO;
public class readPPMOutputOthers {
public static void main(String[] args) throws InterruptedException {
// read a ppm file
Scanner sc;
// if the file is not found, it will throw an exception
try {
sc = new Scanner(new FileInputStream("res/test2.ppm"));
} catch (FileNotFoundException e) {
throw new IllegalArgumentException("File not found!");
}
// the file now is a StringBuilder
// read line by line to get information
StringBuilder builder = new StringBuilder();
while (sc.hasNextLine()) {
String s = sc.nextLine();
// ignore comment #
if (s.charAt(0) != '#') {
builder.append(s).append(System.lineSeparator());
}
}
sc = new Scanner(builder.toString());
String token;
token = sc.next();
// set the fields
// initial load image
int width = sc.nextInt();
int height = sc.nextInt();
int maxValue = sc.nextInt();
List<Integer> pixels = new ArrayList<>();
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int r = sc.nextInt();
int g = sc.nextInt();
int b = sc.nextInt();
int rgb = r;
rgb = (rgb << 8) + g;
rgb = (rgb << 8) + b;
pixels.add(rgb);
}
}
// make a BufferedImage from pixels
BufferedImage outputImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
int[] outputImagePixelData = ((DataBufferInt) outputImg.getRaster().getDataBuffer()).getData();
for (int i = 0; i < pixels.size(); i++) {
outputImagePixelData[i] = pixels.get(i);
}
try {
ImageIO.write(outputImg, "png",
new File("res/test.png"));
ImageIO.write(outputImg, "jpg",
new File("res/test2.jpg"));
ImageIO.write(outputImg, "bmp",
new File("res/test.bmp"));
} catch (IOException e) {
System.out.println("Exception occurred :" + e.getMessage());
}
System.out.println("Images were written successfully.");
}
}
images comparison
The weird thing is it works for a very large image but not for this small image. I need to make it work for such small images because of testing. I've been digging posts about this on google and still didn't find a way to solve this. Any help would be appreciated!
What is an example that doesn't work?
https://i.stack.imgur.com/GTrpa.png I'm not sure if this link works for you
That links to a png not res/test2.ppm as used as input by your example code.
it seems like I can't upload a ppm file here. but here is the content of the file: "P3
2 2
255
255
0
0
0
255
255
255
0
255
255
255
0
"
@d0nut Are you getting correct colors when saving the image as PNG?
@Rotem yes, just jpg/jpeg that is not working
@d0nut I figured out the reason. JPEG chroma sub-sumpling default is YUV420. In YUV420 every 2x2 pixels have the same chroma information (the 2x2 pixels have the same color). The 2x2 pixels have the same color but each pixel has different luminance. That is the reason the 4 pixels has the same color (the color is a mixture of the 4 original colors).
There is a way to save JPEG image in YUV444 chroma sub-sumpling, but it's much less common. I found this post for example, but I can't find good answers... GIMP manages to save JPEG with YUV444 chroma sub-sumpling, so there is way for doing it.
@Rotem I think you are correct, and it would be great if you could rework your comment into an answer. Theoretically, JPEG can be stored as plain RGB or non-subsampled YCbCr (YUV) in addition to the more common subsampled YCbCr, but there's no easy way to control subsampling or output "color space" through the ImageIO JPEG plugin, unfortunately.
@HaraldK do you know any other library that can help me output a jpg file correctly?
It’s not really about the library. It’s the technology. Even if you find a library that outputs the image like you want, it will be larger than the equivalent BMP, PNG and GIF. JPEG is great for compressing “natural” images. Not so for “artificial” images like this with solid colors, sharp edges and in your case extremely small size. For more “normal” images, the standard ImageIO JPEG plugin will do just fine.
The answer in this post seems to work for me, writing a JPEG with 4:4:4 (no chroma subsampling). The result has visually correct colors (close to the PNG/BMP). The JPEG is 467 bytes, compared to the 70 byte BMP and 76 byte PNG.
The reason for the strange colors is YUV420 chroma subsumpling used by JPEG encoding.
In YUV420 every 2x2 pixels have the same chroma information (the 2x2 pixels have the same color).
The 2x2 pixels have the same color, but each pixel has different luminance (brighness).
The YUV420 Chroma subsumpling is demonstrated in Wikipedia:
And in our case:
becomes
The brown color is a mixture of the original red, cyan magenta and the yellow colors (the brown color is "shared" by the 4 pixels).
Note:
Chroma subsumpling is not considered as "compression", is the sense that it not performed as part of the JPEG compression stage.
We can't control the chroma subsumpling by setting the compression quality parameter.
Chroma subsumpling is referred as part of the "color format conversion" pre-processing stage - converting from RGB to YUV420 color format.
The commonly used JPEG color format is YUV420, but JPEG standard does support YUV444 Chroma subsumpling.
GIMP manages to save JPEG images with YUV444 Chroma subsumpling.
Example (2x2 image):
Too small: Enlarged:
I couldn't find an example for saving YUV444 JPEG in JAVA...
To some degree the effect you describe is to be expected.
From https://en.wikipedia.org/wiki/JPEG:
JPEG is a commonly used method of lossy compression for digital
images, particularly for those images produced by digital photography.
The degree of compression can be adjusted, allowing a selectable
tradeoff between storage size and image quality. JPEG typically
achieves 10:1 compression with little perceptible loss in image
quality.
Maybe when storing small files you can set the compression to be low and thus increase quality. See Setting jpg compression level with ImageIO in Java
I tried every compression from 0.0f to 1.0f, but the colors are all different from the original image.
Is that happening on a 2x2 pixels image? Wondering whether the compression algorithms may work on a 4 or 8 pixels compression algorighm which has bugs at that small scale...
@HiranChaudhuri I found that the reason is the YUV420 chroma sub-sumpling, where every 2x2 pixels have the same chroma information (same color). I am going to up vote your answer if you post a solution that saves a JPEG image in YUV444 chroma sub-sumpling.
| 19,735 |
https://stackoverflow.com/questions/35996755 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | Bad Dub, Dispersia, Igor, https://stackoverflow.com/users/1260204, https://stackoverflow.com/users/3924743, https://stackoverflow.com/users/4338301 | English | Spoken | 357 | 526 | Group By, Take First with a vale from second
I have a list that I generate from a view in my database. I want to cast the results to their own class using linq and c#. I want to group by id and then select all values from the first of the groupings but also select one value from the second entity in the grouping.
For example
Id Name Score1 Score2
1 Jack 10 11
1 Jill 10 11
I want to be able to group by Id, select score 1 and 2 from the first record (they will always be the same) but also select the name jack and jill.
Is this even possible?
Thanks
So you just want to select the first two records from each groupby, correct?
Yes there will only ever be two when group. I pretty much want to merge the two records but take both Name values
Why not make it easy and group by everything but name? This should be no problem if what you say is true, the scores are the same across the ids.
var result = from user in users
group user by new {user.Id, user.Score1, user.Score2}
into groupedUsers
select new { groupedUsers.Key.Id, groupedUsers.Key.Score1, groupedUsers.Key.Score2, Names = groupedUsers.Select(x => x.Name)};
This is the assumption that you are grouping all records on id with the following model, not just the first 2 encountered records that have the same id.
public class User
{
public string Name { get; set; }
public int Id { get; set; }
public int Score2 { get; set; }
public int Score1 { get; set; }
}
Thanks for the swift reply. I will try this now
This works perfectly. Though the names are stored in an array like this?
http://i.imgur.com/rNfKZrN.png
@BadDub - Yes but you can do whatever you want with the names. You never specified, just that you wanted them grouped so names = IEnumerable object.
Oh so these are just strings? Thought they were an array of characters. This is great then. Thank you for all your help!
Doing .select instead of selectmany does the job. Thank you very much!
| 29,237 |
https://ce.wikipedia.org/wiki/%D0%90%D0%BB%D0%B0%D0%BD%D0%B9%D0%B0%D0%BB%D0%B8%20%28%D0%A2%D0%BE%D1%80%D0%BE%D1%81%D0%BB%D0%B0%D1%80%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Аланйали (Торослар) | https://ce.wikipedia.org/w/index.php?title=Аланйали (Торослар)&action=history | Chechen | Spoken | 40 | 177 | Аланйали () — Туркойчоьнан Лаьттайуккъера хӀордан регионан Мерсин провинцин (ил) Торосларнан кӀоштара эвла/микрокӀошт ().
Географи
Истори
Бахархой
Билгалдахарш
Хьажоргаш
Мерсин провинцин нах беха меттигаш
Мерсин провинцин микрокӀошташ
Торосларнан микрокӀошташ
Торосларнан кӀоштан нах беха меттигаш
Туркойчоьнан микрокӀошташ
Туркойчоьнан нах беха меттигаш | 16,741 |
https://stackoverflow.com/questions/22628069 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Eytch, https://stackoverflow.com/users/2341714 | English | Spoken | 178 | 244 | Limit access to an Azure site to only the VPN connected computers
this might be a dumb question.
is it possible to restrict the access to my Azure website http://sitename.cloudapp.net so that only the computers connected to my VPN will be able to access the site?
I use cloud services, and i have a vpn on my local computer(for now). the idea is(if possible), to have a connection between my vpn (which is local network) AND my cloudservice. Then allow the site access to only the computers within the vpn
You can set up a VPN and disable the public endpoints, so only machines within the VPN have access, but I think this is only available for VM's and Cloud Services - and not Windows Azure Websites. You don't say which you use.
"Windows Azure Virtual Network provides you with the capability
to extend your network into Windows Azure..."
Channel 9 offers some useful guides
Windows Azure Virtual Machines and Virtual Networks
thanks for the response. forgot to include what i use: cloud service.. i've updated my question
| 48,392 |
https://drupal.stackexchange.com/questions/125566 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Cisum Inas, Gokul N K, https://drupal.stackexchange.com/users/13813, https://drupal.stackexchange.com/users/4876 | English | Spoken | 92 | 155 | Simple category with drupal commerce not showing to anonymous users
I followed this guide https://drupalcommerce.org/user-guide/setting-product-catalog and now I have a nice simple category page, but not visible to anonymous users. I tried changing the roles to marking all three options but no luck.. Any suggestions?
check view permissions.
tried this but no luck... https://www.drupal.org/node/1490434
Here are some tips:
Set all checkboxes in People -> Premissions : Product-> View any product of any type
or If you are using any contextual filter in views configuration be sure that arguement exists in category page;
| 1,571 |
https://sv.wikipedia.org/wiki/Desa%20Mulyosari%20%28administrativ%20by%20i%20Indonesien%2C%20Jawa%20Tengah%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Desa Mulyosari (administrativ by i Indonesien, Jawa Tengah) | https://sv.wikipedia.org/w/index.php?title=Desa Mulyosari (administrativ by i Indonesien, Jawa Tengah)&action=history | Swedish | Spoken | 78 | 176 | Desa Mulyosari är en administrativ by i Indonesien. Den ligger i provinsen Jawa Tengah, i den västra delen av landet, km öster om huvudstaden Jakarta.
Tropiskt regnskogsklimat råder i trakten. Årsmedeltemperaturen i trakten är °C. Den varmaste månaden är oktober, då medeltemperaturen är °C, och den kallaste är maj, med °C. Genomsnittlig årsnederbörd är millimeter. Den regnigaste månaden är januari, med i genomsnitt mm nederbörd, och den torraste är september, med mm nederbörd.
Källor
Indelningar i Jawa Tengah | 17,316 |
https://stackoverflow.com/questions/48248833 | StackExchange | Open Web | CC-By-SA | 2,018 | Stack Exchange | Emran Sadeghi, John V, https://stackoverflow.com/users/2742432, https://stackoverflow.com/users/970696 | English | Spoken | 412 | 851 | Drawing does not work after resizing user control with Dock is not None
I have a very simple code to draw a grid on my user control (after calling the base class OnBackgroundPaint):
private void DrawGrid(Graphics g)
{
Pen p = new Pen(new HatchBrush(HatchStyle.LargeGrid | HatchStyle.Percent50, Color.LightGray, Color.Transparent), 1);
for (int i = 0; i < this.Size.Width; i+=50)
{
g.DrawLine(p, new Point(i, this.Location.Y), new Point(i, this.Size.Height));
}
for (int i = 0; i < this.Size.Height; i += 50)
{
g.DrawLine(p, new Point(this.Location.X,i), new Point(this.Size.Width, i));
}
p.Dispose();
}
When I place this control to the main form and do not use docking, it works well with resizing. However, when I set the Dock property to anything else than None, after resizing the drawn areas are erased and never drawn again. What could be the reason?
this is becuse you must start from 0, 0 location
when you create user control and you want to drow on it you must start from 0, 0 top left location not reallocation of user control on parent
private void DrawGrid(Graphics g)
{
Pen p = new Pen(new HatchBrush(HatchStyle.LargeGrid | HatchStyle.Percent50, Color.LightGray, Color.Transparent), 1);
for (int i = 0; i < this.Size.Width; i+=50)
{
g.DrawLine(p, new Point(i, **0**), new Point(i, this.Size.Height));
}
for (int i = 0; i < this.Size.Height; i += 50)
{
g.DrawLine(p, new Point(**0**,i), new Point(this.Size.Width, i));
}
p.Dispose();
}
also you must call this function in your control constructor :
this.SetStyle(ControlStyles.DoubleBuffer |
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint,
true);
this.UpdateStyles();
this calling tell to user control
drawing is performed in a buffer, and after it completes, the result is output to the screen. Double-buffering prevents flicker caused by the redrawing of the control. If you set DoubleBuffer to true, you should also set UserPaint and AllPaintingInWmPaint to true.,
the control paints itself rather than the operating system doing so. If false, the Paint event is not raised. This style only applies to classes derived from Control.
and
the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should only be applied if the UserPaint bit is set to true.
for more info you can see this link :
https://msdn.microsoft.com/en-us/library/system.windows.forms.controlstyles(v=vs.110).aspx
No, that is not the reason. Just tried, not working.
did you try OnPaint insted of OnBackgroundPaint and also in control contructore this.SetStyle...
Hey, that did the trick (calling that function in the constructor). Thanks! Why is this needed by the way?
And what was the problem that the resize when docked did not work?
| 29,309 |
https://fa.wikipedia.org/wiki/%D8%AC%D8%B1%D8%A7%D9%84%D8%AF%20%D9%86%D9%88%DA%AF%D8%A8%D8%A7%D8%A6%D9%88%D8%B1 | Wikipedia | Open Web | CC-By-SA | 2,023 | جرالد نوگبائور | https://fa.wikipedia.org/w/index.php?title=جرالد نوگبائور&action=history | Persian | Spoken | 63 | 267 | جرالد نوگبائور (؛ زاده ) یک فیزیکدان، و ستارهشناس اهل ایالات متحده آمریکا است.
منابع
اخترشناسان اهل ایالات متحده آمریکا
اعضای فرهنگستان ملی دانش آمریکا
اعضای مجمع فیلسوفان آمریکا
اهالی گوتینگن
دانشآموختگان انستیتوی فناوری کالیفرنیا
دانشآموختگان دانشگاه کرنل
درگذشتگان ۲۰۱۴ (میلادی)
دریافتکنندگان جایزه گوگنهایم
زادگان ۱۹۳۲ (میلادی)
فیزیکدانان اهل ایالات متحده آمریکا
آلمانیهای مهاجرتکرده به ایالات متحده آمریکا
افسران ارتش ایالات متحده آمریکا | 10,633 |
https://eu.wikipedia.org/wiki/Cernay%20%28Vienne%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Cernay (Vienne) | https://eu.wikipedia.org/w/index.php?title=Cernay (Vienne)&action=history | Basque | Spoken | 320 | 890 | Cernay Frantziako udalerri bat da, Vienne departamenduan dagoena, Akitania Berria eskualdean. 2013an biztanle zituen.
Demografia
Biztanleria
2007an Cernay udalerrian erroldatutako biztanleak 425 ziren. Familiak 174 ziren, horien artean 48 pertsona bakarrekoak ziren (36 bakarrik bizi ziren gizonak eta 12 bakarrik bizi ziren emakumeak), 55 seme-alabarik gabeko familiak ziren, 59 seme-alabak dituzten bikoteak ziren eta 12 seme-alabak dituzten guraso-bakarreko familiak ziren.
Biztanleriak, denboran, ondorengo grafikoan ageri den bilakaera izan du:
Erroldatutako biztanleak
<noinclude>
Etxebizitza
2007an 199 etxebizitza zeuden, 179 familiaren etxebizitza nagusia ziren, 9 bigarren erresidentzia ziren eta 11 hutsik zeuden. Etxebizitza guzti hauek 199etxeak ziren. 179 etxebizitza nagusietatik 161 bere jabearen bizilekua ziren, 17 alokairuan okupaturik zeuden eta 1 doan lagata zegoen; 1ek gela bat zuen, 15 etxek bi zituzten, 22 etxek hiru zituzten, 51 etxek lau zituzten eta 90 etxek bost zituzten. 143 etxek euren parking plaza propioa zuten azpian. 70 etxetan ibilgailu bat zegoen eta 94 etxetan bat baino gehiago zituzten.
Biztanleria-piramidea
2009an sexu eta adinaren araberako biztanleria-piramidea hau zen:
Ekonomia
2007an lan egiteko adina zuten pertsonak 257 ziren, horien artean 190 aktiboak ziren eta 67 inaktiboak ziren. 190 pertsona aktiboetatik 176 lanean zeuden (96 gizon eta 80 emakume) eta 14 langabezian zeuden (7 gizon eta 7 emakume). 67 pertsona inaktiboetatik 28 erretiraturik zeuden, 17 ikasten zeuden eta 22 "bestelako inaktibo" gisa sailkaturik zeuden.
Diru sarrerak
2009an Cernay udalerrian 181 unitate fiskal zeuden, 442,5 pertsonek osaturik. Pertsona bakoitzeko diru-sarrera fiskalaren mediana urteko 16.374 euro zen.
Ekonomia jarduerak
2007an zeuden 5 komertzioetatik, 1 janari enpresa zen, 3 eraikuntza enpresak ziren eta 1 zerbitzu enpresa zen.
2009an zeuden norbanakoentzako 3 zerbitzu publikoetatik, 1 igeltseroa zen, 1 margolaria eta 1 argiketaria.
2000. urtean Cernay udalerrian 4 nekazaritza-ustiategi zeuden.
Gertuen dauden herriak
Diagrama honek gertuen dauden herriak erakusten ditu.
Erreferentziak
Kanpo estekak
Résumé statistique INSEEren udalerriko estatistiken laburpena.
Évolution et structure de la population INSEEren udalerriko datuen fitxa.
France par comune Frantziako udalerri guztietako datu zehatzak mapa baten bitartez eskuragarri.
Vienneko udalerriak | 39,548 |
https://kk.wikipedia.org/wiki/%D0%9A%D0%B0%D0%BC%D0%B7%D0%BE%D0%BB%D0%BA%D0%B0%20%28%D3%A9%D0%B7%D0%B5%D0%BD%29 | Wikipedia | Open Web | CC-By-SA | 2,023 | Камзолка (өзен) | https://kk.wikipedia.org/w/index.php?title=Камзолка (өзен)&action=history | Kazakh | Spoken | 126 | 504 | Камзолка (Камзола) — Ресейдегі өзен. Саратов облысы, Пенза облысы, Воронеж облысы жер аумақтарынан ағып өтеді. Өзен сағасы Белое көлі орналасқан. Өзен ұзындығы 44 км-ді құрайды.
Су реестрінің мәліметтері
Ресей мемлекеттік су тізілімінің мәліметі бойынша Дон су алабы өңіріне жатады, өзеннің сушаруашылық бөлігі — Хопер бастауынан Ворона өзенінің құйылысына дейін. Өзен саласы — Хопер, өзен алабы — Дон (су алабының Ресейдегі бөлігі).
Ресей су ресурстары федералды агенттігі дайындаған РФ территориясын сушаруашылығы бойынша аудандастыру жөніндегі геоақпараттық жүйе мәліметтері бойынша:
Мемлекеттік су реестріндегі су объектісінің коды — 05010200112107000005520
Гидрологиялық тұрғыдан зерттелу (ГЗ) коды — 107000552
Су алабының коды — 05.01.02.001
ГЗ томының нөмірі — 07
ГЗ бойынша шығарылуы — 0
Дереккөздер
Сыртқы сілтемелер
Ресей Федерациясы Табиғи ресурстар және экология министрлігі
Саратов облысы өзендері
Пенза облысы өзендері
Воронеж облысы өзендері | 32,069 |
https://it.wikipedia.org/wiki/Province%20Unite%20del%20R%C3%ADo%20de%20la%20Plata | Wikipedia | Open Web | CC-By-SA | 2,023 | Province Unite del Río de la Plata | https://it.wikipedia.org/w/index.php?title=Province Unite del Río de la Plata&action=history | Italian | Spoken | 339 | 618 | Province Unite del Río de la Plata fu la denominazione utilizzato dallo Stato sorto dopo la Rivoluzione di Maggio del 1810 fino a circa metà del decennio del 1830. Lo Stato occupava i territori dell'attuale Argentina, Uruguay e l'attuale dipartimento boliviano di Tarija.
Storia
Durante la dichiarazione di indipendenza del 9 luglio 1816 presero il nome di Province Unite del Sud America. A questa dichiarazione non presero parte le province confederate della Lega dei Popoli Liberi, che riconoscevano José Gervasio Artigas come "Protettore" e che avevano dichiarato l'indipendenza dalla Spagna nel protocongresso dell'arroyo de la China, oggi Concepción del Uruguay, nel 1815.
Il nome cadde quindi in disuso, essendo rimpiazzato con quello di Confederación Argentina, riferito già solamente al territorio argentino, fino al 1861 approssimativamente. Anche la bandiera, sebbene disegnata su modello di quella statunitense, contiene i colori azzurro e bianco della vecchia bandiera e condivide, insieme all'Argentina, il Sol de Mayo come simbolo nazionale.
Da allora, il nome República Argentina è quello abituale, sebbene la Costituzione argentina ammette i tre come nomi ufficiali, utilizzando il termine La Nación Argentina (Nazione argentina) nella formazione e nell'emissione delle leggi. L’area attuale dell’Uruguay funse da Stato cuscinetto tra l’odierna Argentina e quello che fu l’Impero del Brasile.
Directores supremos
Gervasio Antonio de Posadas (31 gennaio 1814 - 9 gennaio 1815)
Carlos María de Alvear (9 gennaio 1815 - 15 aprile 1815)
Juan José Viamonte (18 aprile 1815 - 20 aprile 1815)
José Ignacio Álvarez Thomas (20 aprile 1815 - 16 aprile 1816)
Antonio González Balcarce (16 aprile 1816 - 9 luglio 1816)
Juan Martín de Pueyrredón (9 luglio 1816 - 9 giugno 1819)
José Casimiro Rondeau (9 giugno 1819 - 11 febbraio 1820)
Juan Pedro Julián Aguirre y López de Anaya (11 febbraio 1820 - 19 febbraio 1820)
Note
Voci correlate
Director supremo delle Province Unite del Río de la Plata
Governatorato del Río de la Plata
Altri progetti
Collegamenti esterni
Stati costituiti negli anni 1810
Stati dissolti negli anni 1830
Storia dell'Argentina
Storia dell'Uruguay
Stati americani scomparsi
Storia della Bolivia | 8,092 |
https://sv.wikipedia.org/wiki/Cloeophoromyia%20teocchii | Wikipedia | Open Web | CC-By-SA | 2,023 | Cloeophoromyia teocchii | https://sv.wikipedia.org/w/index.php?title=Cloeophoromyia teocchii&action=history | Swedish | Spoken | 36 | 94 | Cloeophoromyia teocchii är en tvåvingeart som beskrevs av Loïc Matile 1970. Cloeophoromyia teocchii ingår i släktet Cloeophoromyia och familjen platthornsmyggor.
Artens utbredningsområde är Centralafrikanska republiken. Inga underarter finns listade i Catalogue of Life.
Källor
Platthornsmyggor
teocchii | 21,045 |
https://stackoverflow.com/questions/47417426 | StackExchange | Open Web | CC-By-SA | 2,017 | Stack Exchange | Nhat Nguyen, https://stackoverflow.com/users/8634526 | English | Spoken | 146 | 198 | How can I get a UIToolBar with buttons created from a view controller to another?
I am trying to create a second view controller and I would like to have the same toolbar with buttons that I created and coded from the first view controller without creating and coding that toolbar again. How can I do that?
A better approach would be to create the toolbar in a parent view controller. You should use a navigation controller embedded in a container view for that.
This is the scene structure of this approach in Interface Builder:
View structure (click to enlarge):
Use an Embed Segue to display the navigation controller in the container view.
You can use delegates to pass actions (e.g. a bar button item was tapped).
Read more about delegates in Swift here.
Yes, I rearranged my storyboard and codes. Finally, it worked! Thanks @the4kman
| 23,673 |
https://es.wikipedia.org/wiki/Alexandr%20Dokturishvili | Wikipedia | Open Web | CC-By-SA | 2,023 | Alexandr Dokturishvili | https://es.wikipedia.org/w/index.php?title=Alexandr Dokturishvili&action=history | Spanish | Spoken | 80 | 163 | Alexandr Dokturishvili –– (Tiflis, 22 de mayo de 1980) es un deportista georgiano que compitió en lucha grecorromana (desde 2003 compitió bajo la bandera de Uzbekistán).
Participó en los Juegos Olímpicos de Atenas 2004, obteniendo la medalla de oro en la categoría de . Ganó una medalla de oro en el Campeonato Europeo de Lucha de 2001, en la categoría de .
Palmarés internacional
Referencias
Luchadores de Georgia
Luchadores de Uzbekistán
Medallistas olímpicos de oro de Uzbekistán
Nacidos en Tiflis | 21,646 |
https://stackoverflow.com/questions/11985409 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Jason, https://stackoverflow.com/users/1118476 | Swahil | Spoken | 161 | 482 | entitydatasource one to many to one
I am trying to build a drop down list with an entitydatasource and a query. I am recieving the following error message, I am unsure about what I am doing wrong:
'UserId' is not a member of 'Transient.collection [WebAppModel. UserSite(Nullable=True, DefaultValue=)]'. To extract a property of a collection element, use a subquery to iterate over the collection. Near simple identifier, line 6, column 69.
Entity Data Source
<asp:EntityDataSource ID="edsSites" runat="server"
ConnectionString="name=WebAppEntities"
DefaultContainerName="WebAppEntities"
EntitySetName="Sites"
Include="Sites, UserSites"
Where="EXISTS(SELECT Sites.SiteId, Sites.Domain FROM Sites
WHERE UserSites.UserId=@UserId)">
<WhereParameters>
<asp:Parameter Name="UserId" DbType="Guid" />
</WhereParameters>
</asp:EntityDataSource>
edm(Site) - Table(Sites)
SiteId - PK
List item
Organisation
FirstName
LastName
Domain
Address1
Address2
City
State
Postcode
CountryId
Phonenumber
Email
edm(UserSite) - Table(UserSites)
UserId FK
SiteId FK
I dont think that post really relates to my question?
Issue resolved!
<asp:EntityDataSource ID="edsSites" runat="server"
ConnectionString="name=WebAppEntities"
DefaultContainerName="WebAppEntities"
EntitySetName="Sites"
Where="EXISTS(SELECT VALUE u FROM it.UserSites AS u WHERE u.UserId = @UserId)" EnableFlattening="False" Select="it.[SiteId], it.[Domain]">
<WhereParameters>
<asp:Parameter Name="UserId" DbType="Guid" />
</WhereParameters>
</asp:EntityDataSource>
| 36,852 |
https://vi.wikipedia.org/wiki/Calamus%20balerensis | Wikipedia | Open Web | CC-By-SA | 2,023 | Calamus balerensis | https://vi.wikipedia.org/w/index.php?title=Calamus balerensis&action=history | Vietnamese | Spoken | 36 | 62 | Calamus balerensis là loài thực vật có hoa thuộc họ Arecaceae. Loài này được Fernando mô tả khoa học đầu tiên năm 1988.
Tham khảo
Liên kết ngoài
B
Thực vật được mô tả năm 1988 | 14,027 |
https://sv.wikipedia.org/wiki/Dysdera%20hamulata | Wikipedia | Open Web | CC-By-SA | 2,023 | Dysdera hamulata | https://sv.wikipedia.org/w/index.php?title=Dysdera hamulata&action=history | Swedish | Spoken | 30 | 65 | Dysdera hamulata är en spindelart som beskrevs av Kulczynski 1897. Dysdera hamulata ingår i släktet Dysdera och familjen ringögonspindlar. Inga underarter finns listade i Catalogue of Life.
Källor
Ringögonspindlar
hamulata | 46,152 |
https://io.wikipedia.org/wiki/Philibert%20Tsiranana | Wikipedia | Open Web | CC-By-SA | 2,023 | Philibert Tsiranana | https://io.wikipedia.org/w/index.php?title=Philibert Tsiranana&action=history | Ido | Spoken | 26 | 59 | Philibert Tsiranana (1912 til 1978) profesoro di Franciana linguo e di matematiko, esis l'unesma prezidanto di Madagaskar, e guvernis de 1959 til 1972.
Prezidanti di Madagaskar | 7,025 |
https://ceb.wikipedia.org/wiki/Cuchilla%20de%20Santodomingo | Wikipedia | Open Web | CC-By-SA | 2,023 | Cuchilla de Santodomingo | https://ceb.wikipedia.org/w/index.php?title=Cuchilla de Santodomingo&action=history | Cebuano | Spoken | 101 | 179 | Tagaytay ang Cuchilla de Santodomingo sa Kolombiya. Nahimutang ni sa departamento sa Departamento del Cauca, sa habagatan-kasadpang bahin sa nasod, km sa habagatan-kasadpan sa Bogotá ang ulohan sa nasod.
Ang kasarangang giiniton °C. Ang kinainitan nga bulan Oktubre, sa °C, ug ang kinabugnawan Hunyo, sa °C. Ang kasarangang pag-ulan milimetro matag tuig. Ang kinabasaan nga bulan Mayo, sa milimetro nga ulan, ug ang kinaugahan Septiyembre, sa milimetro.
Saysay
Ang mga gi basihan niini
Mga bungtod sa Departamento del Cauca
Kabukiran sa Kolombiya nga mas taas kay sa 3000 metros ibabaw sa dagat nga lebel
Mga artikulo sa posisyon itarong ni bot | 46,450 |
https://fr.wikipedia.org/wiki/Bible%20syriaque%20de%20Paris | Wikipedia | Open Web | CC-By-SA | 2,023 | Bible syriaque de Paris | https://fr.wikipedia.org/w/index.php?title=Bible syriaque de Paris&action=history | French | Spoken | 398 | 629 | La Bible Syriaque de Paris (Paris, Bibliothèque Nationale, MS syr. 341) est un manuscrit enluminé de la Bible écrit en langue syriaque. Il est daté du ou . On pense qu'il a été réalisé dans le nord de la Mésopotamie. Le manuscrit est composé de 246 folios de par . Pour des raisons d'économie, le texte y est écrit sur 3 colonnes.
Les enluminures sont des miniatures présentant chacun des livres de la Bible et présentés dans une colonne du texte. La miniature du Livre de la Genèse, qui était peut-être la plus belle, manque. Même si la plupart des miniatures sont des portraits de l'auteur, quelques-unes présentent des scènes du livre suivant. Par exemple, la miniature précédant le Livre de Job présente Job sur le tas de fumier. Cette miniature rassemble plusieurs scènes du Livre de Job. Job est présenté nu sur le tas de fumier, couvert de plaies. Sous lui, sa femme lui parle. À gauche, se trouvent ses trois amis. Un d'eux prend ses vêtements, alors que les deux autres sont assis, et lui parlent.
Le Livre de l'Exode a aussi une miniature narrative à son début. Il présente Moïse et Aaron demandant la permission de partir à Pharaon. Il est difficile de comprendre pourquoi cette scène, plutôt qu'une des autres plus populaires a été choisie comme seule illustration de l'Exode. D'autres miniatures présentent des groupes allégoriques. La miniature du Livre des Proverbes montre la Vierge à l'Enfant, entourée de Salomon, incarnant la sagesse de l'Ancien Testament, et l'Ecclésia, une personnification de l'Église chrétienne.
Les miniatures présentent un mélange de l'héritage hellénistique avec la tradition narrative syriaque. Certaines miniatures, et surtout la miniature de l'Exode, présente des similitudes stylistiques avec les miniatures des Évangiles de Rabula. À partir de cette observation, il est peu probable que ce manuscrit ait été fait postérieurement aux évangiles de Rabula datés de 586.
Le manuscrit est supposé venir de la bibliothèque épiscopale de Siirt près du Lac de Van, où il a pu être produit. Il est à la Bibliothèque nationale de France depuis 1909.
Références
Calkins, Robert G. Illuminated Books of the Middle Ages. Ithaca, New York: Cornell University Press, 1983.
Weitzmann, Kurt. Late Antique and Early Christian Book Illumination. New York, George Braziller, 1977.
Manuscrit biblique du VIe siècle
syriaque
Manuscrit enluminé byzantin
Manuscrit enluminé conservé à la Bibliothèque nationale de France
Manuscrit enluminé du VIe siècle | 20,765 |
https://es.wikipedia.org/wiki/Eustomias%20posti | Wikipedia | Open Web | CC-By-SA | 2,023 | Eustomias posti | https://es.wikipedia.org/w/index.php?title=Eustomias posti&action=history | Spanish | Spoken | 209 | 447 | Eustomias posti es una especie de pez de la familia Stomiidae en el orden de los Stomiiformes.
Morfología
• Los machos pueden llegar alcanzar los 14,6 cm de longitud total.
Número de vértebras: 67.
Hábitat
Es un pez de mar y de aguas profundas que vive hasta 660 m de profundidad.
Distribución geográfica
Se encuentra al suroeste del Atlántico.
Referencias
Bibliografía
Fenner, Robert M.: The Conscientious Marine Aquarist. Neptune City, Nueva Jersey, Estados Unidos : T.F.H. Publications, 2001.
Helfman, G., B. Collette y D. Facey: The diversity of fishes. Blackwell Science, Malden, Massachusetts, Estados Unidos , 1997.
Hoese, D.F. 1986: . A M.M. Smith y P.C. Heemstra (eds.) Smiths' sea fishes. Springer-Verlag, Berlín, Alemania.
Maugé, L.A. 1986. A J. Daget, J.-P. Gosse y D.F.E. Thys van den Audenaerde (eds.) Check-list of the freshwater fishes of Africa (CLOFFA). ISNB Bruselas; MRAC, Tervuren, Flandes; y ORSTOM, París, Francia. Vol. 2.
Moyle, P. y J. Cech.: Fishes: An Introduction to Ichthyology, 4a. edición, Upper Saddle River, Nueva Jersey, Estados Unidos: Prentice-Hall. Año 2000.
Nelson, J.: Fishes of the World, 3a. edición. Nueva York, Estados Unidos: John Wiley and Sons. Año 1994.
Wheeler, A.: The World Encyclopedia of Fishes, 2a. edición, Londres: Macdonald. Año 1985.
Enlaces externos
Catalogue of Life (en inglés)
posti | 50,965 |
https://uk.wikipedia.org/wiki/%D0%93%D1%83%D1%80%D1%96%20%D0%A8%D0%B0%D0%BD%D0%BA%D0%B5 | Wikipedia | Open Web | CC-By-SA | 2,023 | Гурі Шанке | https://uk.wikipedia.org/w/index.php?title=Гурі Шанке&action=history | Ukrainian | Spoken | 367 | 1,077 | Гурі Шанке (; норв. вимова: [ˈꞬʉ̀ːɾi ˈskɑ̀ŋkə] ) ( Гурі Аніка Шанке, ) — норвезька актриса та співачка. Вона відома в Норвегії своєю акторською кар'єрою, і вона була частиною туру 2005 року в норвезькій версії «Танців з зірками», де вона посіла друге місце.
Кар'єра
Її дебют як актриси відбувся в 1982 році в Осло Най Театр. З тих пір вона брала участь у ряді успішних мюзиклів, таких як Les Misérables, Summer in Tyrol та Annie Get Your Gun. Вона брала участь у багатьох телевізійних шоу та постановках, наприклад, у норвезькому серіалі Hotel Cæsar. З 1991 по 2010 вона була одружена з коміком Ойвіндом Бланком.
Щороку, між Різдвом та новорічною ніччю, норвезький телеканал NRK транслює комедію музичного театру «The Spanish Fly» (1990), у якій також зіграли Гурі Шанке та її майбутній чоловіком Ойвінд Бланк.
Гран-прі Мелоди
Гурі виграла Гран-прі Мелоді у 2007 році зі своєю піснею «Ven a bailar conmigo», написаною Thomas G:son. Гурі виграла Гран-прі Norsk Melodi 2007 з 108 541 голосом, що на 30 000 голосів більше, ніж пісня на 2-му місці. Завдяки своїй перемозі в Осло на NMGP, Гурі представляла Норвегію на пісенному конкурсі Євробачення 2007 року.
Результати MGP 2007:
1. Гурі Шанке - «Ven a bailar conmigo» 108 541 голосів
2. Jannicke Abrahamsen - Rocket ride 78 433 голосів
3. Crash! - Wannabe 64 285 голосів
4. Dusty Cowshit - Chicken rodeo 63 062 голоси
Конкурс пісні Євробачення
Гурі Шанке, представляючи Норвегію з «Ven a bailar conmigo», брала участь у півфіналі 10 травня 2007 року в Гельсінкі, але не змогла вийти в топ-10 для кваліфікації у фінал. Вона виступила на 19-й позиції слідом за македонкою Кароліною Ґочевою з «Mojot svet» і перед Олівією Льюїс з «Вертиго» з Мальти.
Дісней
Шанке передала свій голос кільком норвезьким версіям анімаційних функцій Уолта, включаючи:
Покахонтас - як Покахонтас
Русалочка - як Аріель Русалочка 2: Повернення до моря і Русалочка 3: Початок Аріель
101 далматин - як Пердіта
Коти-аристокати - як герцогиня біла кішка
Олівер і компанія
Chip 'n Dale Rescue Rangers - гаджет Hackwrench
Див. також
Конкурс пісні Євробачення 2007
Примітки
Посилання
Офіційний сайт
Відеокліп: Елізабет Андреассен з Гурі Шанке, співає "Десь над веселкою" в NRK .no
Норвезькі телеакторки
Учасники Євробачення 2007
Представники Норвегії на Євробаченні
Норвезькі співачки | 47,502 |
https://stackoverflow.com/questions/13670638 | StackExchange | Open Web | CC-By-SA | 2,012 | Stack Exchange | Amir Naghizadeh, IAmYourFaja, gniourf_gniourf, https://stackoverflow.com/users/1016467, https://stackoverflow.com/users/1815797, https://stackoverflow.com/users/1846956, https://stackoverflow.com/users/1848654, https://stackoverflow.com/users/892029, melpomene, misterakko | English | Spoken | 537 | 910 | How to SSH into multiple servers from bash shell and provide full logins?
This seems to be a pretty popular question, and one that has about 1,000 different answers depending on what forum you look at. Unfortunately, none work for me.
I'm trying to write a bash shell script that SSHes into a list of servers and runs a simple stop <x> service command to shutdown application servers on each machine.
To do this manually:
ssh user@server01.ourdomain.tld
user@server01.ourdomain.tld's password: ourpassword
Last login: Fri Nov 30 14:37:51 2012 from <some-ip-addr>
server01:[user@machinename ~]# (now we are SSHed in)
So I ask: given a set name of servers (server01 through server25), how can I write a bash script to SSH into all of them and run service ourservice stop? This script should not require any human interaction once kicked off, and so should provide the SSH command with the appropriate password (ourpassword) to use. Furthermore, I need properly exit (or just close connections) after the script SSHes into each server so we don't hang resources (open connections, etc.). Thanks in advance.
might good to use /usr/bin/expect .
Usually you want to use public/private keys for automation, not passwords.
@melpomene , so How can he call service <x> stop on each server?.
The answer given in the comments by melpomene is obviously your best option.
your answer:http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-a-remote-machine
http://stackoverflow.com/questions/5663679/execute-bash-script-stored-in-a-file-over-ssh
Do this
Make yourself a public/private keypair, using the ssh-keygen command
Save your private key in all of your servers, inside the .ssh/authorized_keys folder
Now you can connect to any server without typing a password, which is our first objective here.
Now you can send commands to your servers using the following syntax:
ssh username@serverid 'command'
There's a nice if short description of this at this page.
So, you just concatenate your 25 commands in a file and fire that up, like this:
ssh user@server1.yourservers.com 'service ourservice stop'
ssh user@server2.yourservers.com 'service ourservice stop'
Thanks @misterakko (+1) - if I actually want to run a shell script on each server, can you just confirm that the command would be: ssh root@server1.yourservers.com './run-myscript.sh'? Thanks again!
It's not a good idea to allow root login from ssh! This is fortunately turned off by default on sensible ssh servers.
@gniourf_gniourf Security was not a factor in the original question. Personally, I close the SSH port on my firewalls for any IP except the fixed one from my offices, so I have no fear in ssh'ing as root. As always, security means inconveniencing work, so you choose the best compromise you find.
The OP has user and not root as login. Now, you do whatever you want to do with your servers, but I'd prefer not to see a root login in an answer given to a novice user.
Anybody? Is that how I would run the script?
@HeineyBehinds Yes, but be careful. Basically, what you're doing here is opening a shell on the remote machine just for the time it takes to run the command. If your script tries to fork or fire background commands - directly or indirectly - those processes might be terminated when the mother shell is killed in a very short amount of time. These conditions can be hard to understand and debug.
| 48,606 |
https://en.wikipedia.org/wiki/Boat%20Gauging%20House%2C%20Tipton | Wikipedia | Open Web | CC-By-SA | 2,023 | Boat Gauging House, Tipton | https://en.wikipedia.org/w/index.php?title=Boat Gauging House, Tipton&action=history | English | Spoken | 275 | 398 | The Boat Gauging House is a building in Tipton, West Midlands, England. It is situated by the Main Line of the Birmingham Canal Navigations, and was used for calibrating new canal boats in order later to ascertain the weight of cargo carried. It is a Grade II listed building.
Background
Canal companies charged boats for using the canals, the fees, based on the weight of the cargo, being collected at toll points. In order to assess the weight of cargo, boats were initially calibrated. The "wet" method was done during the building of the boat; the Birmingham Canal Navigations (BCN) used the "dry" method, in which a new or refitted boat was loaded from empty with ton weights, and the resulting freeboard, or "dry inches", as the boat sat lower in the water, was each time noted. Gauging plates were then fixed to the boat.
Description and history
The BCN built gauging houses (or gauging stations) at Smethwick in 1872, and at Tipton in 1873. The Tipton gauging house could accommodate boats up to the coal-carrying "Hampton" boats of eighty feet in length. It was in use until gauging and toll collection was abandoned in 1959.
The building is next to the Factory Locks at Tipton. It is built of red and blue bricks laid in English bond, and has a hipped roof. The interior originally had two docks (since filled in) running west–east, lock gates inside the western doorways, and internal cranes.
References
External links
Tipton heritage trail leaflet from Sandwell Metropolitan Borough Council
Grade II listed buildings in the West Midlands (county)
Tipton
Buildings and structures in Sandwell
Birmingham Canal Navigations
Toll (fee) | 25,690 |
https://pt.wikipedia.org/wiki/Salmo%20lumi | Wikipedia | Open Web | CC-By-SA | 2,023 | Salmo lumi | https://pt.wikipedia.org/w/index.php?title=Salmo lumi&action=history | Portuguese | Spoken | 61 | 119 | Salmo lumi é uma espécie de peixe da família Salmonidae.
Pode ser encontrada nos seguintes países: Albania e República da Macedónia.
Os seus habitats naturais são: lagos de água doce.
Está ameaçada por perda de habitat.
Referências
Crivelli, A.J. 2005. Salmo lumi. 2006 IUCN Red List of Threatened Species. Dados de 5 de Agosto de 2007.
Salmo
Peixes descritos em 1958 | 38,432 |
https://la.wikipedia.org/wiki/Amanitaceae | Wikipedia | Open Web | CC-By-SA | 2,023 | Amanitaceae | https://la.wikipedia.org/w/index.php?title=Amanitaceae&action=history | Latin | Spoken | 153 | 361 | Amanitaceae sunt familia fungorum ordinis Agaricalium. Principale familiae genus est Amanita, et alia familiae genera sunt Catatrama et Limacella. Studia mycologica magnam diversitatem in eorum definitionibus familiae exhibent, atque grave et recentissimum, Index fungorum, hos fungos in Pluteaceas digerit; ea diu in Agaricaceas digesta sunt.
Species in terris silvestribus plerumque habitant. Eae ex structura ovi simili ex rica universa (vel involucro universo) emergunt.
Intra familiam sunt species quae edibilitate et sapore magnopere aestimantur exque contrario species cui est venenum mortiferum. Plus quam dimidium eventuum veneficiorum a fungis effectorum ex singulis huius familiae sunt. Mortiferissimis huius familiae singulis sunt nomina quae de veneno monent, sed aliis, toxicitatis variabilis, non sunt.
Nonnullae species notabiles in Amanitaceis
Amanita caesarea
Amanita muscaria
Amanita rubescens
Amanita pantherina
Amanita phalloides
Amanita velosa
Amanita virosa
Index familiarum Agaricalium
Nexus externi
De plus quam 500 taxibus Amanitarum apud situm pluto.njcc.com
Photogrammata fungorum apud situm infochembio.ethz.ch
Agaricales
Taxa R. Heim
Taxa 1983 | 28,829 |
https://stackoverflow.com/questions/24406993 | StackExchange | Open Web | CC-By-SA | 2,014 | Stack Exchange | Ehsan Akbar, Eugene Podskal, https://stackoverflow.com/users/3446201, https://stackoverflow.com/users/3745022 | English | Spoken | 470 | 854 | How can return a text based on value in database in EF6 using get method
I create a model using EF6 .My model is like this :
public partial class Good
{
public Good()
{
this.InnoviceDetails = new HashSet<InvoiceDetail>();
}
public int Id { get; set; }
public string Serial { get; set; }
public string HasTax { get; set; }
public string InitialAmount { get; set; }
public string Group { get; set; }
public virtual ICollection<InvoiceDetail> InnoviceDetails { get; set; }
}
One of the my columns is HasTax and the value of this is 1 and 0 ,but in mygridview i need to change these values (0,1). i mean if the value is 1 shows Yes and if it is 0 shows No.I want to do these using get method of my model ?Is it possible ?
Get method checks the values in database and return proper values to gridview or Presentation layer ?
Best regards
What UI do you use? Windows Forms, WPF, or is it an ASP.NET page?
Similar questions have been already asked - try to read: http://stackoverflow.com/questions/15267666/entity-framework-code-first-convert-between-class-boolean-and-column-integer; http://stackoverflow.com/questions/19370104/convert-value-when-mapping; http://stackoverflow.com/questions/6708996/convert-from-to-string-in-database-to-boolean-property-entity-framework-4-1/6709186#6709186
And what do you mean by 'using get method of my model'?
I mean i checked the value in get method ,because the get method returns value of an object
You mean getter method in property(Int32 Value{get;}) or some loading method that loads your entities?
some loading method that loads my entities
I have given you those links - have you tried them? There are not many ways to do what you want in UI-agnostic way. And I doubt that someone can produce anything different from what is already proposed.
yes but it just for avoiding database mapping
If you:
1) Don't want to directly change your model or create views.
2) Or add any additional properties that will be used only for binding-with-conversion.
Then you are left with two main variants I could think of:
1) Create a semi-wrapper that exposes your original model and additional special property for binding-with-conversion:
public class ModelSemiWrapperBase<TModel>
{
public ModelSemiWrapperBase(TModel model)
{
this.Model = model;
}
public TModel Model
{
get;
private set;
}
}
public class GoodSemiWrapper : ModelSemiWrapperBase<Good>
{
public String HasTax
{
get
{
return (this.Model.HasTax == 0) ? ("Yes") : ("No");
}
set {...}
}
}
Just do not forget about INotifyPropertyChanged and changes notification. Also in this case you will have to manually add columns in the DataGridView.
2) Handle events in the DataGridView:
Something like How do I use a ValueConverter with Databinding in Winforms, just with dataGridView using the CellValueChanged, CellValidating, DataBindingComplete or other similar events.
I am not even sure which events you should really use. And I'd not gone using such a way. It is too error-prone and it strongly bundles your dataGridView with validation and conversion logic.
| 21,048 |
https://stackoverflow.com/questions/16460647 | StackExchange | Open Web | CC-By-SA | 2,013 | Stack Exchange | Imran, Matthew Watson, https://stackoverflow.com/users/106159, https://stackoverflow.com/users/1531157 | English | Spoken | 642 | 890 | How to ensure a struct with a string array as a field would follow value semantics while assigning to another variable
In MSDN documentation it is mentioned that "Structs are copied on assignment. When a struct is assigned to a new variable, all the data is copied, and any modification to the new copy does not change the data for the original copy."
I have struct which has a string array as the only field inside it.
struct MyVar
{
private readonly string[] value;
MyVar(string[] iVal)
{
value = iVal;
}
}
When I assign one struct variable to another how to ensure the string array would be copied fully (deep copy) to assigned variable.
@Rakkun: I am trying to convert code written in a language which is developed in-house using visual parser to c# where it is expected follow value semantics.
@Rakkun, Could you please provide an answer?
You can't do this in C# because there's no way to intercept the compiler-generated code to copy the struct's data from one to another.
The only thing you can really do is to make your struct fully immutable.
That means:
When you create the struct, make a defensive copy of any mutable reference types that you store inside the struct (such as the string array in your example).
Do not pass your mutable reference type objects to anything that can mutate them.
Do not expose any mutable reference types from the struct. That would mean that you couldn't expose the string array from your struct.
Don't do anything to mutate any reference types held in your struct. So in your example, you couldn't change the contents of your string array.
That's a lot of limitations. The safest way is to never store any mutable reference types in your struct...
Anyway, to make your struct safer you can defensively copy the string array:
struct MyVar
{
private readonly string[] value;
MyVar(string[] iVal)
{
value = (string[])iVal.Clone();
}
}
That particular example is now safe to copy because it doesn't have any way for the string array to be mutated. But as soon as you add any mutator methods or expose the string array via a property, or pass it to anything that might mutate it, you're back to square one.
If you want to make a "manual" copy of your struct though, you can do that via serialization.
It's just that you can't do anything about:
MyVar var1 = new MyVar(test);
MyVar var2 = var1;
Thank you for your valuable suggestions. I wonder why you finally said "It's just that your can't do anything about:". Do you mean to say even after cloning the array in the constructor, the statement MyVar var2 = var1 would not copy var1 string array to var2 string array?
@Imran Sorry, I wasn't clear enough. I meant that you can't protect against someone writing those simple lines of code to make a copy of the struct, BUT you could write a method to make a deep copy of your struct and use that. It's just that you can't force people to make copies using such a custom method.
Thank you again. I love SO. A great place for beginners like me to learn how something should and should not be done.
I followed instructions and modified my struct but still the statement MyVar var2 = var1 resulting in var2 referring to var1 string array. var2 is not getting its own copy. What am I doing wrong?
@Imran My answer was intended to say that you can't make it so that each struct gets its own copy. Rather, a workaround is to make it so that it doesn't matter if the structs are sharing data between them by making it immutable. (That's why I started my answer with "You can't do this in C#")
Ok...I got it now. Thank you.
| 22,265 |
nZXkOMlWJhk_1 | Youtube-Commons | Open Web | CC-By | null | Terrifier 2 (2022) | Movie Review - SPOILER FREE | None | English | Spoken | 886 | 1,058 | What's going on guys welcome back to the channel critical overload here So this would be the spoiler-free review for Damien Leone's terrifier to the long awaited sequel to terrifier now It's written and directed by Damien Leone Leone once again It stars Felicia Rose David Howard thornback is Arthur clown Lauren Lavera Samantha skip Scaffidi and we have Elliott Elliott full Fulham Tamara Glenn or Tamara Glenn who knows in Halloween 5 and some other individuals So this movie is revolving around Art the Clown who after being resurrected by sinister entity He returns to Miles County where he must hunt down and destroy a teenage girl and her brother on Halloween night As the body count rises the siblings fight to stay alive while uncovering the true nature of arts evil Intent now I got to see this courtesy of the fantastic fest coverage. I'm doing it remotely But terrifying to remains the gruesome gory unsettling qualities of that original and Amplifies them by blending it with an actually engaging story that provides you with a pair of siblings to root for against Art the Clown I said before I felt the original film gave David Howard thorn a playground to play in and everything around him Was just lacking like nobody else around him was playing at the same level. He was playing that now though His unhinged performance is propelled thanks to a final girl that is easy to get behind Since the story allows time for the view to grow connected to her This of course is the character of Sienna who is portrayed brilliantly by Lauren Lavera I hope to see more of her in horror movies before I get to right once a compliment the sound design of the film Nearly every other kill will have you went scene or cringing in all the white all the right ways because of the sound design The bones crunching the scouts being pulled back all of it will be felt in some way when you watch the practical effects make it all That more better. I truly think that by having a family dynamic drama at the center of this It also just enhances the gore because it's building up To that epic final battle that we know is gonna happen as you knew as you tend to get in most horror movies So because you're not wanting this to happen to the characters that you're growing connected to over the course of that first hour There's one kill sequence in particular that reminded me a lot of Olivia's death in Screen 4 and all the kill sequences are basically gory highlight reels of carnage They always want to outdo the one that came before it I don't think this sequel has the haunting imagery that terrifier offered the original But the visuals are still going to have you like what the f did I just watch now again? This film has a lot more depth depth to it. So I will say While there is still exaggerated senseless over-the-top gore because we spend time with Sienna and her brother Jonathan played by Elliot Fulham There's this balance between gore and actual storytelling as well. Thanks to that Jonathan is in the true crime and Sienna thinks it's a horrible idea for him to go around dressed as art the clown since it might be Insensitive to those victims or relatives of victims from the last year prior Sienna is our final girl whose progression in the film felt similarly Kind of like on par or very similar reminiscent of Sarah's in the descent Neil Marshall's the descent So my descent fans, you'll enjoy that little nugget. I just threw out there this character She's she's a badass by the time the movie comes to a conclusion She starts again as this reserve team then slowly evolves and follows the standard final girl route that just built to this gruesome Action packed finale with David Howard Thorne both of these two are excellent in their roles And I'm just glad Thorne was able to be given a wonderful co-star to bounce bounce off of here There are plot threads that don't seem to be fully developed perhaps intentionally in case of a third film The supernatural crumbs that you see in the original they're highlighted more profoundly here this time with the help of a Very terrifying child performance. I don't I don't want to go into too many details about that It's just really unsettling what that young actress was doing in her role. I'll say I Also was shocked that this film didn't dive deeper into the discussion of true crime So while it raised a lot of other questions about arts lore because it does dive deeper into that It does drop the ball a bit when it comes to this social commentary aspect of true crime Because it didn't dive that deep into the way. I thought it was going to that's it sucks something that's so timely, especially considering all the reactions I'm seeing to the Dahmer show so I Was hoping that they would dive deeper into what people's thoughts are on that we get like a Dinner table sequence about it, but that's it. | 25,014 |
https://arz.wikipedia.org/wiki/%D8%AF%D9%8A%D9%86%D9%8A%D8%B3%20%D8%B1%D8%A7%D9%83%D9%8A%D9%84%D8%B2 | Wikipedia | Open Web | CC-By-SA | 2,023 | دينيس راكيلز | https://arz.wikipedia.org/w/index.php?title=دينيس راكيلز&action=history | Egyptian Arabic | Spoken | 84 | 233 | دينيس راكيلز لاعب كورة قدم من لاتفيا.
حياته
دينيس راكيلز من مواليد يوم 20 اغسطس 1992 فى جيكاببيلس.
الحياه الرياضيه
بيلعب فى مركز مهاجم, و لعب مع فريق نادى ريدنج و زاجويمبيه لوبين و منتخب لاتفيا لكره القدم و نادى كراكوفيا الرياضى و نادى لييباياس ميتالورجس و GKS Katowice و منتخب لاتفيا تحت 21 سنه لكره القدم و منتخب لاتفيا تحت 17 سنه لكره القدم و منتخب لاتفيا تحت 19 سنه لكره القدم.
لينكات برانيه
مصادر
لاعبين كوره القدم
لاعبين كوره قدم من لاتفيا | 42,502 |
https://zh-classical.wikipedia.org/wiki/%E5%90%8D%E5%BC%B5%E5%B8%82 | Wikipedia | Open Web | CC-By-SA | 2,023 | 名張市 | https://zh-classical.wikipedia.org/w/index.php?title=名張市&action=history | Classical Chinese | Spoken | 10 | 194 | 名張市屬日本三重縣。處伊賀盆地南部,山川環之。赤目四十八瀑、香落溪在焉。
沿革
昭和廿九年,名賀郡:名張町、瀧川村、箕曲村、國津村合而爲。
卅二年,倂名賀郡古山村之一部。
地理
南靠津市、奈良縣宇陀郡曾爾村、同宇陀市,西臨奈良縣山邊郡山添村,北接伊賀市。
據
它典
名張市政府
近畿地方區劃 | 44,349 |
https://fr.wikipedia.org/wiki/Capacit%C3%A9%20de%20saturation | Wikipedia | Open Web | CC-By-SA | 2,023 | Capacité de saturation | https://fr.wikipedia.org/w/index.php?title=Capacité de saturation&action=history | French | Spoken | 40 | 61 | La capacité de saturation est la faculté des armes à feu à rendre trop dangereux ou impossibles le mouvement et la station dans une zone, sous peine de dégâts/destruction ou de blessure/mort.
Voir aussi
Tir de suppression
Arme à feu | 18,779 |
https://ceb.wikipedia.org/wiki/Neelus%20poki | Wikipedia | Open Web | CC-By-SA | 2,023 | Neelus poki | https://ceb.wikipedia.org/w/index.php?title=Neelus poki&action=history | Cebuano | Spoken | 42 | 74 | Kaliwatan sa insekto ang Neelus poki. Una ning gihulagway ni Christiansen ug Bellinger ni adtong 1992. Ang Neelus poki sakop sa kahenera nga Neelus, ug kabanay nga Neelidae. Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Daghagtiil
Neelus | 20,637 |
https://ceb.wikipedia.org/wiki/Treasure%20Hill%20Mine | Wikipedia | Open Web | CC-By-SA | 2,023 | Treasure Hill Mine | https://ceb.wikipedia.org/w/index.php?title=Treasure Hill Mine&action=history | Cebuano | Spoken | 62 | 114 | Ang Treasure Hill Mine ngalan niining mga mosunod:
Heyograpiya
Tinipong Bansa
Treasure Hill Mine (minahan sa Tinipong Bansa, California), Butte County,
Treasure Hill Mine (minahan sa Tinipong Bansa, Nevada, Lincoln County),
Treasure Hill Mine (minahan sa Tinipong Bansa, Colorado), Larimer County,
Treasure Hill Mine (minahan sa Tinipong Bansa, Nevada, Pershing County),
Pagklaro paghimo ni bot 2017-02
Pagklaro paghimo ni bot Tinipong Bansa | 11,912 |
https://de.wikipedia.org/wiki/Ralf%20Veidemann | Wikipedia | Open Web | CC-By-SA | 2,023 | Ralf Veidemann | https://de.wikipedia.org/w/index.php?title=Ralf Veidemann&action=history | German | Spoken | 206 | 394 | Ralf Veidemann (* 7. Oktober 1913 in Estland; † 2. Februar 2009) war ein estnischer Fußballspieler deutsch-baltischer Herkunft.
Karriere
Ralf Veidemann spielte in seiner aktiven Karriere für den estnischen Hauptstadtverein JK Tallinna Kalev. Für die estnische Nationalmannschaft debütierte Veidemann am 3. Juni 1937 gegen Litauen in einen Freundschaftsspiel in Kaunas. Mit der estnischen Auswahl nahm der Stürmer im folgenden Jahr an der Qualifikation für die Weltmeisterschaft 1938 in Frankreich teil und kam dort in zwei von drei Qualifikationsspielen zum Einsatz. In den beiden Auswärtsspielen gegen Finnland in Turku und Deutschland in Königsberg kam Veidemann zum Einsatz. Mit der estnischen Nationalmannschaft konnte sich dieser allerdings nicht für die WM qualifizieren.
Außerdem nahm Veidemann zweimal am Baltic Cup teil. Bei seiner ersten Teilnahme 1937 wurde er mit Estland Zweiter, im Jahr darauf beim Baltic Cup 1938 gewann er den Titel und war mit zwei erzielten Treffern bester Torschütze des Wettbewerbs. Das letzte Länderspiel von insgesamt 13 machte er bereits unter sowjetischer Besatzung gegen Lettland am 18. Juli 1940, nachdem die Rote Armee vom 15.–17. Juni 1940 die drei baltischen Länder im Zweiten Weltkrieg annektiert hatte.
Weblinks
Liste aller estnischen Nationalspieler
Ralf Veidemann bei eu-football
Einzelnachweise
Fußballnationalspieler (Estland)
Fußballspieler (JK Tallinna Kalev)
Este
Geboren 1913
Gestorben 2009
Mann
Deutsch-Balte | 18,351 |
https://sk.wikipedia.org/wiki/Mu%C5%BEsk%C3%A1%20dvojhra%20na%20Medibank%20International%202009 | Wikipedia | Open Web | CC-By-SA | 2,023 | Mužská dvojhra na Medibank International 2009 | https://sk.wikipedia.org/w/index.php?title=Mužská dvojhra na Medibank International 2009&action=history | Slovak | Spoken | 63 | 161 | Mužská dvojhra na Medibank International 2009 sa hrala ako súčasť Medibank International Sydney 2009 od 11. januára do 17. januára. Titul získal Argentínčan David Nalbandian, ktorý vo finále zdola Fína Nieminena 6-3, 6-7(9), 6-2. Bol to jeho 10. titul na okruhu ATP.
Nasadenie
Odmeny a body do rebríčka
Výsledky
Finále
Horná polovica
Dolná polovica
Externé odkazy
Pavúk dvojhry
Pavúk kvalifikácie
Medibank International 2009 | 21,351 |
https://stackoverflow.com/questions/38461486 | StackExchange | Open Web | CC-By-SA | 2,016 | Stack Exchange | Drew Marsh, cassandrad, https://stackoverflow.com/users/185859, https://stackoverflow.com/users/2152061 | English | Spoken | 324 | 423 | Why do we need Reliable Actors reentrancy?
I can't figure out why do we need reentrancy. As I understood, calls from actor to actor isn't a good practice. And in example in this article we even have three actors calling each other.
Is there any real example to show advantages of reentrancy and how and for what purposes it have to be used?
I'd be interested in knowing where you read something that told you "calls from actor to actor isn't a good practice". That's just not the case. There are many patterns where various actors are designed to work closely together to accomplish a goal.
@DrewMarsh you can see a picture with actors using techniques at very beginning of introduction to actors here and there is no actor-to-actor.
Also, if you take a look at this article where depicted implementation of social network on actors, you can see that if one actor will call another, then some person will become unreachable for some time.
@DrewMarsh and as it is a social network, we would expect that actors will be available and reachable with low latency as there could be a very popular user whose actor's methods will be called very often, so long delays could “paralyze” this user. Yes, I saw examples with computations and aggregation. Probably I really should not think that actor-to-actor interaction is a bad practice.
It allows an actor to process more than one request at a time when the requests are part of the same chain of actor calls. Actors are single-threaded meaning an actor can only process one request at a time. Without reentrancy, A -> B -> C -> A would deadlock. Actor to actor calls are perfectly fine as long as you play by the single-threaded rules.
I understand this, but is there any real examples of situation when you need to call the A actor from the C actor? Any examples from real life?
| 18,999 |
https://fa.wikipedia.org/wiki/%D8%AF%DB%8C%D8%A7%D9%86%D8%A7%20%D9%BE%D8%AA%D8%B1%D8%A7%DA%A9%DB%8C%D9%88%D8%A7 | Wikipedia | Open Web | CC-By-SA | 2,023 | دیانا پتراکیوا | https://fa.wikipedia.org/w/index.php?title=دیانا پتراکیوا&action=history | Persian | Spoken | 37 | 120 | دیانا پتراکیوا (؛ زادهٔ ) بازیکن فوتبال اهل بلغارستان است.
وی همچنین در تیم ملی فوتبال Bulgaria بازی کردهاست.
منابع
افراد زنده
بازیکنان فوتبال اهل بلغارستان
بازیکنان فوتبال زن اهل بلغارستان
زادگان ۱۹۸۱ (میلادی)
هافبکهای زن فوتبال | 20,292 |
https://no.wikipedia.org/wiki/Wells-next-the-Sea | Wikipedia | Open Web | CC-By-SA | 2,023 | Wells-next-the-Sea | https://no.wikipedia.org/w/index.php?title=Wells-next-the-Sea&action=history | Norwegian | Spoken | 398 | 847 | Wells-next-the-Sea, lokalt kjent bare som Wells, er en havneby og et verdslig sogn i Norfolk i England. Wells ligger 24 km øst for feriestedet Hunstanton, 32 km vest for Cromer, og 16 km nord for Fakenham. Byen Norwich ligger 51 km i sørøst. Blant landsbyer i nærheten finner man Blakeney, Burnham Market, Burnham Thorpe (Horatio Nelsons fødested), Holkham (med herregården Holkham Hall) og Walsingham (et viktig pilegrimssted i middelalderen).
Sognet har et areal på 16,31 km², og i 2001 en befolkning på 2 451 innbyggere, noe som ble redusert til 2 165 innbyggere ved folketellingen i 2011.
Navnet kommer fra de mange naturlige kildene (spring wells) som fantes i området; kun noen få av disse eksisterer fortsatt. På begynnelsen av 1800-tallet la man til «next-the-Sea» for å skille byen fra andre steder kalt Wells. Etter at jernbanen kom i 1857 ble det tatt i bruk en kortere form av navnet, Wells-on-Sea, men i 1956 besluttet byrådet å ta tilbake den eldre, lange formen.
Geografi
Byen ligger bare omkring halvannen kilometer fra Nordsjøen, og mye av arealet er sjøområder som er fylt igjen. Det har vært en travel havn der i lang tid, og etter at jernbanen kom ble byen også et populært feriested. Det går en smalsporet jernbane deler av veien ut til stranden, langs den halvannen kilometer lange vollen som beskytter bilen mot havets krefter. Det er tett skog helt ned til stranden. Den gamle havnen ligger nå ved en ferskvannssjø kjent som Abrahams Bosom, som brukes til vannsport.
Øst for stranden ligger et annet strandområde med skog helt ned til sjøen. Det er mulig å gå dit ved lavvann, men dette er meget farlig på grunn av den raske vekslingen mellom høy- og lavvann i området, og de tidevanns- og understrømmer dette medfører.
Dt var tidligere jernbaneforbindelse via to linjer, men begge er nedlagt. Linjen mot King's Lynn ble aldri gjenåpnet etter omfattende skader under Nordsjøflommen i 1953, mens linjen til Norwich ble lagt ned under nedskjæringene i 1960-årene.
Redningsbåtkatastrofen
I 1880 inntraff en katastrofe utenfor Wells, da elleve av de tretten i mannskapet på redningsbåten omkom. De etterlot seg ti enker og 27 farløse barn. Det står et minnesmerke ved den gamle redningsstasjonen, som nå er havnekontor.
Gallery
Referanser
Eksterne lenker
Wells-next-the-Sea , lokal webportal
Tidevannstabeller for Wells-next-the-Sea.
Fotografier og fakta om Wells-next-the-Sea
Wells Norfolk Online
Byer i Norfolk
Havnebyer i Storbritannia
Havnebyer ved Nordsjøen | 48,580 |
https://no.wikipedia.org/wiki/VM%20i%20kunstl%C3%B8p%202001 | Wikipedia | Open Web | CC-By-SA | 2,023 | VM i kunstløp 2001 | https://no.wikipedia.org/w/index.php?title=VM i kunstløp 2001&action=history | Norwegian | Spoken | 45 | 111 | VM i kunstløp 2001 (verdensmesterskapet i kunstløp) ble arrangert i Vancouver i Canada i 2001.
Medaljetabell
Referanser
VM i kunstløp
Internasjonale mesterskap i Canada
Internasjonale mesterskap i 2001
Sport i Canada i 2001
Sport i Vancouver
Artikler i skøytesportprosjektet
Kunstløp i 2001
Kunstløp i Canada | 33,787 |
https://ja.wikipedia.org/wiki/%E3%82%B0%E3%83%AA%E3%83%BC%E3%83%8A%E3%82%A6%E3%82%A7%E3%82%A4 | Wikipedia | Open Web | CC-By-SA | 2,023 | グリーナウェイ | https://ja.wikipedia.org/w/index.php?title=グリーナウェイ&action=history | Japanese | Spoken | 11 | 119 | グリーナウェイ(Greenaway)は、英語圏の姓。
ケイト・グリーナウェイ - イギリスの挿絵画家、絵本画家。
ギャビン・グリーナウェイ - イギリスの作曲家、指揮者。
ピーター・グリーナウェイ - イギリスの映画監督、脚本家。
英語の姓 | 45,944 |
https://en.wikipedia.org/wiki/Geoffrey%20Chipperfield | Wikipedia | Open Web | CC-By-SA | 2,023 | Geoffrey Chipperfield | https://en.wikipedia.org/w/index.php?title=Geoffrey Chipperfield&action=history | English | Spoken | 278 | 366 | Sir Geoffrey Howes Chipperfield, KCB (born 1933) is a retired British civil servant.
Born in 1933, Chipperfield attended New College, Oxford. He was called to the bar at Gray's Inn in 1955. The following year, he entered HM Civil Service as an official in the Ministry of Housing and Local Government. From 1970 to 1973, he was secretary to the Greater London Development Plan Inquiry. He was then in the Department of the Environment, where was a deputy secretary from 1982. He was appointed a Companion of the Order of the Bath (CB) in the 1985 Birthday Honours. In 1987, he was appointed a deputy secretary in the Department of Energy; he was appointed the department's Permanent Secretary in 1989. In 1991, he was appointed Permanent Secretary and Chief Executive of the Property Services Agency in succession to Patrick Brown. He served until 1993. He was promoted to Knight Companion of the Order of the Bath (KCB) in the 1992 Birthday Honours.
After leaving the civil service, he was commissioned by the government to carry out an assessment of the Royal Fine Art Commission and delivered his report in 1996. He worked as a director of South West Water (later Pennon Group), serving as its Deputy Chairman from 2000 to 2003. He was also the Pro-Chancellor of the University of Kent from 1999 to 2005; in 2018, the university honoured him by renaming its business school building the Chipperfield Building.
References
Living people
1933 births
British civil servants
Alumni of New College, Oxford
Knights Companion of the Order of the Bath
Civil servants in the Property Services Agency
Civil servants in the Ministry of Housing and Local Government | 4,983 |
https://pl.wikipedia.org/wiki/Pos%C5%82a%C5%84cy%202%3A%20Na%20przekl%C4%99tej%20ziemi | Wikipedia | Open Web | CC-By-SA | 2,023 | Posłańcy 2: Na przeklętej ziemi | https://pl.wikipedia.org/w/index.php?title=Posłańcy 2: Na przeklętej ziemi&action=history | Polish | Spoken | 97 | 207 | Posłańcy 2: Na przeklętej ziemi (ang. Messengers 2: The Scarecrow) – angielski thriller z 2009 roku. Jest prequelem filmu Posłańcy. Angielska premiera filmu odbyła się 21 lipca 2009 roku. Film został nakręcony w roku 2008 w Sofii.
Obsada
Norman Reedus jako John Rollins
Heather Stephens jako Mary Rollins
Claire Holt jako Lindsay Rollins
Laurence Belcher jako Michael Rollins
Richard Riehle jako Jude Weatherby
Darcy Fowers jako Miranda Weatherby
Randy Erbi Ago jako Randy
Matthew McNulty jako zastępca Milton
Michael McCoy jako pan Peterson
Kalina Green jako Little Girl-Ghost
Linki zewnętrzne
Amerykańskie filmy z 2009 roku
Amerykańskie dreszczowce | 22,408 |
https://mn.wikipedia.org/wiki/%D0%93%D0%B8%D0%B4%D1%80%D0%BE%D0%BC%D0%B5%D1%82%D0%B0%D0%BB%D0%BB%D1%83%D1%80%D0%B3 | Wikipedia | Open Web | CC-By-SA | 2,023 | Гидрометаллург | https://mn.wikipedia.org/w/index.php?title=Гидрометаллург&action=history | Mongolian | Spoken | 1,175 | 5,386 | Гидрометаллургийн тухай ерөнхий ойлголт
Сүүлийн үед дан ганц механик аргаар боловсруулахад хүндрэлтэй хүдрийг баяжуулах, баяжмал ба завсрын бүтээгдэхүүнийг гүйцээн боловсруулахад технологийн хосолсон схемийг хэрэглэх болсон. Үүний нэг нь гидрометаллургийн процессыг баяжуулалтын механик операциудтай өхамтатгах юмуу эсвэл дангаар нь хэрэглэх явдал юм.
Гидрометаллургийн арга нь ерөнхийдөө уусгах арга юм. Гидрометаллургийн процесс явагдах зарчим нь металлуудыг тэдгээрийн хүдэр, баяжмал, үйлдвэрлэлийн завсрын бүтээгдэхүүн, хаягдал зэргээс химийн урвалжийн усан уусмалаар уусган уусмал байдалд шилжүүлэн тухайн металлыг сонгомлоор ялган авахад үндэслэгдэнэ.
Гидрометаллургийн процессыг ерөнхийд нь үндсэн ба туслах гэж хоёр ангилдаг.
Үндсэн процесс нь эрдсүүд дэх үнэт бүрэлдэхүүнийг уусгагч урвалжийн тусламжтайгаар уусмал байдалд шилжүүлэх уусгалтын процесс юм.
Туслах процесст цементаци (металлаар ангижруулах), экстракци, ион солилцоо, электролиз, цахилгаан цэвэршүүлэлт гэх мэт процессууд ордог. Өөрөөр хэлбэл уусмал дахь тухайн элементийн агуулгыг нэмэгдүүлэх, цэвэр металл болон түүний нэгдлүүдийг ялган авах процесс юм.
Гидрометаллургийн процессын онолын үндэс
Эрдсүүдийн термодинамик тогтворшил болон тэдгээрийн урвалжтай харилцан үйлчлэх урвалын термодинамик шинж чанараар уусгалтын процесс нь тодорхойлогддог. Эрдсийн химийн тогтворшил нь кристалл орон торын энергийн утгаар тодорхойлогдоно. Энэ нь дараах нөхцөлөөс хамаардаг. Үүнд:
- кристалл орон торын төрөл
- кристалл орон торын найрлаганд агуулагдах атом, молекулын ионы хэмжээ
- тэдгээрийн хоорондох химийн төрөл холбоо
- торны бүтцийн нэгж болон элементийн исэлдлийн хэм
- кристалл орон торын гажилт
Кристалл бүтцүүдээс энергийн нөөц хамгийн бага агуулсан нь илүү тогтвортой байдаг. Өөрөөр хэлбэл кристалл торон дахь атомуудын холбоо хэдий чинээ нягт байна төдий чинээ тухайн бодис химийн тогтворшилт ихтэй байдаг. Эрдсүүдийн термодинамик харьцангуй тогтворшлыг Гиббсийн энергийн харьцаагаар тодорхойлдог байна
Гиббсийн энергийн товчлол:
ΔG298≈ΔH298
ΔH298 –энтальпийн өөрчлөлт, (тогтмол даралт, температурт явагдаж буй химийн урвалын
дулааны илрэл) кДж/моль
ΔG- Гибссийн энерги, кДж/моль
Гибссийн энергийн багасалтын утга нь эрдсийн термодинамик тогтворшилтийн тухай үнэлэлт өгдөг. Гиббсийн энергийн багасалт нь хэдий өндөр байна төдий чинээ эрдсийн тогтворшилт нь өндөр байна.
Мөн уусгах процесс явагдах магадлалыг Гиббсийн энергийн багасалтын утга болон химийн урвалын тэнцвэрийн урвалаар тооцон тодорхойлдог. Гиббсийн энергийн
өөрчлөлтийн утга нь тухайн урвалын дүнд үүссэн нийт бүтээгдэхүүний чөлөөт энергийн нийлбэрээс анхдагч бүтээгдэхүүний чөлөөт энергийн нийлбэрийг хассантай тэнцүү байдаг.
ΔG=ΣΔG бүт - ΣΔGанх
Гиббсийн энергийн сөрөг утга нь тухайн урвал явагдах боломжийг илэрхийлдэг бол эерэг утга нь процесс явагдах боломжгүйг тодорхойлно. ΔG-н сөрөг утга хэдий чинээ их байна, урвал явагдах магадлал төдий чинээ их байна.
Хүчил, шүлт болон давсны усан уусмалд эрдэс уусах процесс маш олон хүчин зүйлээс харилцан хамааралтай явагддаг бөгөөд химийн урвалын хурд:
- температур
- уусмалын концентраци
- даралт
- катализаторын оролцоо
- харилцан үйлчлэлцэх талбай
- уусч байгаа эрдсийн шинж чанар зэргээс гадна бодит нөхцөлд масс болон дулаан солилцох нөхцөлөөс зихээхэн хамаардаг.
Эрдсийн уусалт явагдах үед хатуу-шингэн фазын зааг орчимд уусмал ханасан хэлбэрт шилжин урвалын кинетик буурдаг. Энэ тохиолдолд диффузлэх үзэгдлийг хурдасгах нь (хутгалтын эрчмийг нэмэгдүүлэх) хурданд шууд нөлөөлнө. Иймд урвалын хурд тухайн нөхцөлд диффузлэх хурд эсвэл эрдсийн гадаргууд явагдах урвалын хурдны аль багаар тодорхойлогдоно.
Уусгах процесс, түүний ангилал
Уусгах процесс нь гидрометаллургийн процессын үндсэн процесс юм. Уусгах процессыг ямар нөхцөлд (P, T, агаар, хутгалт, түүхий эд нь хүдэр эсвэл баяжмал гэх мэт) ямар тоног төхөөрөмжинд явагдаж байгаагаас нь хамааран дараах байдлаар ангилдаг.
Үүнд:
- Газар доор буюу байранд нь уусгах. Хүдрийн биетийг тээвэрлэлгүйгээр тэслэн буталж рафинат уусмалыг өндөр даралтаар шахан өгч уусмал цугларах хэсгээс баян уусмалыг газрын гүнээс өөр хоолойгоор соруулан авах замаар уусгах процесс явагдана.
- Далангын уусгалт. Байгалийн жамаар үүссэн уулын жалга, бага хэмжээний хавцалд уурхайгаас олборлосон хүдрийг бутлан, конвейраар тээвэрлэн даланг ихэвчлэн байгуулдаг. Хэрэв уусгалтын дэвсгэр талбай хүрэлцээгүй бол даланг үе шатаар босгодог. Далангын нэг үеийн зохимжтой өндөр нь 10-15м байдаг. Зарим тохиолдолд хүдэр бутлагдаад хүчлийн боловсруулалт буюу агломерац хийгдсэний дараа далангын талбай руу тээвэрлэгдэнэ. Хүдэр дэх зэсийн агуулга овоолгын уусгалттай харьцуулахад өндөр, уусгалтын хугацаа нь хэдэн долоо хоногоос хэдэн сараар ч үргэлжлэх ба энэ нь овоолгын уусгалтаас харьцангуй богино байдаг.
- Автоклавын уусгалт. Өндөр даралт, температурын дор битүү саванд сульфидыг исэлдүүлэн уусгах процессыг автоклавын уусгалт гэнэ. Уусгалтыг хүчилтөрөгчтэй ба хүчилтөрөгчгүй орчинд, өндөр ба нам температурын гэж ангилдаг. Хүчилтөрөгчтэй үед гаднаас уурыг өндөр даралтаар өгдөг эсвэл материалыг уусгагчийн хамт буцлах температур хүртэл халааж өгдөг. Хүчилтөрөгчгүй үед (Боксит, Уран, Молибден, Вольфрам агуулсан баяжмал), содын уусмалаар уусгалтыг явуулдаг.
- Чанын уусгалт. Агаарын даралтын дор механик хутгагчтай чан дотор уусгах процессыг чанын уусгалт гэнэ. Чаны уусгалтаар маш нунтаг хүдэр, флотацийн процессын завсрын бүтээгдэхүүн болон хаягдлыг боловсруулах боломжтой бөгөөд
уусгалт явагдах хугацаа харьцангуй бага, металл авалт өндөртэй уусгалтын процесс юм.
- Vat уусгалт. Vat уусгалтыг хялбар уусах, агуулга өндөртэй, нөөц багатай исэлдсэн хүдэрт явуулдаг. Хүдэр нь 1-2см-ээс бага болтол бутлагдсан байх шаардлагатай. Vat-г хийхдээ хүчиллэг уусмал үл нэвчүүлэх материалаар хучигдсан талбай дээр дөрвөлжин хана байгуулж доторх талбайд хиймэл улыг уусмал шүүх материал ба уусмал үл нэвчүүлэх суурины дунд нүх сүвэрхэг хавтангууд байрлуулж хийдэг. Vat уусгалтын баян уусмал дахь зэсийн агуулга маш өндөр, баян уусмалыг овоолго, далангын уусгалтын баян уусмалтай (зэсийн агуулгыг экстракцийн нөхцөлд тохиромжтой болтол ихэсгэх зорилгоор) хольж боловсруулдаг.
- Овоолгын уусгалт. Ил уурхайгаас олборлосон хүдрээ тодорхой хэмжээтэй болтол бутлаад конвейер-стакерын системээр тусгайлан бэлтгэсэн хүчилд тэсвэртэй полиэтилен дэвсгэр дээр овоолго байгуулж уусгахыг овоолгын уусгалт гэнэ. Өөрөөр хэлбэл овоолгын уусгалтын процесс нь дараах үе шатуудаас тогтоно.
Үүнд:
1.Ил уурхайгаас олборлосон хүдрээ бутлах
2.Агломерац
3.Овоолго барих
4.Уусах процесс
Үе шат бүрийн үр дүнгээс овоолгын уусгалтын үйл ажиллагаа хамаардаг. Буталж овоолсон хүдрийг уусгаж дууссаны дараа нь зайлуулж өмнөх дэвсгэр дээр дахин шинэ овоолго засдаг аргыг on/off процесс гэнэ. Овоолгын өндрийг тухайн газар нутгийн байршил цаг уурын байдлаас хамааруулан термодинамик хүчин зүйлүүд зохистой хэмжээнд байхаар сонгодог. Овоолгын уусгалтыг хэрэглэдэг үйлдвэрүүд ихэвчлэн 6-10м өндөр, зарим тохиолдолд 2-3м өндөр овоолго байгуулж нимгэн үеэр уусгадаг.
- Эрдсийн био-уусгалт (бактерын) Эрдсийн био-уусгалт нь байгаль дээр орших бичил биет органик бус нэгдлийн исэлдэлтээр ялгарах энергээр тэжээгдэх зүй тогтолд үндэслэгдэж явагдах бөгөөд ердийн атмосферт ус агаарын нөлөөгөөр бактергүй орчинд явагдах исэлдүүлэлтээс олон дахин өндөр хурдтай явагдана. Ихэнх бичил биет нь өсч үржих энергийн эх үүсвэрээ органик устөрөгчөөс авдаг бол био-уусгалтанд ашиглагдах бичил биетүүд нь амьдралын эх үүсвэрээ органик бус нэгдлээс авдаг онцлогтой тул бусад амьд биетэнд өсч үржих үйлчлэл үзүүлэх бололцоогүй. Тэдгээрийн тэжээл нь пирит, арсенопирит, халькозин, халькопирит зэрэг металлын сульфидууд болдог. Ихэвчлэх зэсийн исэлдэлтээс үүсэх хүчиллэг орчинд, жишээ нь халуун рашаан, галт уулын бүс, сульфидээр баялаг бүс, ялангуяа төмрийн сульфидийн орчинд ихэвчлэн тааралдана.
- Бичил биетүүд. Шүүрлийн ус ба халуун рашааны усны хүчиллэг орчинд амьдарч металлын сульфидын найрлаганд байх төмөр ба хүхрийг исэлдүүлэх үйлчилгээ бүхий гетеротроф бактертай харьцангуй цөөн тооны бичил биетүүд байдаг. Эдгээр бичил биетийг ерөнхийд нь хоёр ангилдаг.
1.Хемолитоавтотроф (эрдэс гэх мэт органик бус бодисын исэлдэлтээс энергээ авдаг)
2.Автотроф (хүчилтөрөгчийн эх үүсвэр давхар шаарддаг) гэж ангилдаг.
Эдгээр бичил биетүүд нь сул хүчлийн орчинд температурын 0-800С хязгаарт идэвхтэй үржиж хөгждөг ба амьдрах температураараа:
1.Мезофиль(амьдрахад ердийн температур шаарддаг)
2.Термофиль(өндөр температур шаарддаг) гэж ангилагддаг.
Мезофиль төрлийн бичил биетний амьдрах зохимжит температур нь 25-450С бөгөөд агаар ба усан орчинд сульфидын эрдсүүдийн хамт тохиолдоно.
Термофиль төрлийн бичил биетүүд нь дотроо ердийн болон өндөр температурт үржиж хөгждөг (35-600С), хэт өндөр температурт хөгждөг (60-800С) гэж 2 хуваагдана.
1940-өөд оны сүүлээр төмөр исэлдүүлэх үйлчлэл бүхий хүчилд тэсвэртэй бактерыг шинжлэх ухааны үүднээс судлах эхлэл тавигдсан ба анхны бактерыг 1947 онд Колмер, Темпл, Хинкле нар нээж Thiobacillius ferrooxidans хэмээн нэрлэсэн.
Био-уусгалтанд термофиль бактеруудын үүрэг нилээд өндөр байдаг. Био-уусгалтын орчин дахь пиритийн исэлдэлтийн экзотерм урвал нь овоолгын дотоод температурыг 60-800С хүргэдэг нь термофилуудыг ашиглах шаардлагыг зүй ёсоор бий болгож байна.
Металлург | 2,515 |
https://tr.wikipedia.org/wiki/Corvus%20brachyrhynchos | Wikipedia | Open Web | CC-By-SA | 2,023 | Corvus brachyrhynchos | https://tr.wikipedia.org/w/index.php?title=Corvus brachyrhynchos&action=history | Turkish | Spoken | 428 | 1,393 | Amerikan kargası (Corvus brachyrhynchos) kargagiller familyasının ötücü kuşlar türlerindendir. Kuzey Amerika'nın çoğunda yaygın olarak görülen bir kuştur. Amerikan kargaları, leş kargalarının ve başlıklı kargaların Yeni Dünya'daki karşılığıdır. Amerikan kargası ve başlıklı karga boyut, yapı ve davranış açısından çok benzer olsalar da ötüşleri farklıdır. Yine de Amerikan kargası, Avrasya'daki başlıklı karganın oynadığı rolü üstlenir.
Taksonomi
Amerikan kargası 1822'de Christian Ludwig Brehm tarafından tanımlanmıştır. Bilimsel adı "kısa gagalı karga" anlamına gelen Antik Yunanca brachy- (βραχυ-) "kısa" ve rhynchos (ρυνχος) "gagalı" kelimelerinden türemiştir.
Alt türler
Türün beş alttürü tanınmaktadır. Alt türler gaga boyutunda farklılık gösterirler ve Kuzey Amerika'da boyut olarak kuzeydoğu-güneybatı boyunca değişken bir klinal oluşturur. En küçük kuşlar uzak batıda yer almaktadır. Güneybatıda ise en büyük kuşlar bulunmaktadır.
Corvus brachyrhynchos brachyrhynchos - doğu kargası: ABD'nin kuzeydoğu eyaletlerinde, doğu Kanada ve çevresinde görülür. En büyük alttürdür.
Corvus brachyrhynchos caurinus - kuzeybatı kargası: ABD'nin kuzeybatısında görülen bir alttürdür.
Corvus brachyrhynchos hesperis - batı kargası: Kuzey Kutbu hariç batı Kuzey Amerika, Kuzeybatı Pasifik'de görülür. Orantılı olarak daha ince bir gaga ve alçak sese sahiptir.
Corvus brachyrhynchos pascuus - Florida kargası: Florida. Orta büyüklükte, kısa kanatlı ama uzun gagalı ve uzun bacaklıdır.
Corvus brachyrhynchos paulus - güney kargası: ABD'nin güney eyaletlerinde görülür. Genel olarak daha cüssesi ve gagaları küçüktür.
Açıklama
Amerikan kargası, her yerinde ayırt edici yanardöner siyah tüyleri olan büyük bir kuştur. Bacakları, ayakları ve gagası siyahtır. Kanat açıklığı 85 ila 100 santimetre arasındadır. Kütlesi ise 316 ile 620 gram arasındadır. Türün erkek bireyleri dişilerinden daha büyük olma eğilimindedir.
En yaygın ötüşü, yüksek sesli, kısa ve hızlı bir kaaav-kaaav-kaaav şeklindedir. Genellikle kuşlar bu şekilde öterken başlarını yukarı ve aşağı iterler. Amerikan kargaları ayrıca çok çeşitli sesler üretebilir ve bazen diğer hayvanlar tarafından çıkarılan sesleri taklit edebilir, bunlara çizgili baykuş gibi diğer kuşlar da dahildir.
Balık kargasından (C. ossifragus) görsel olarak ayırt edilmesi son derece zordur ve çoğu zaman yanıltıcı sonuçlar verir. Bununla birlikte, büyüklüklerinde birtakım farklılıklar mevcuttur. Balık kargalarının daha ince gagaları ve ayakları vardır. Gagalarının üst kısmının sonunda küçük, keskin bir çengel olabilir. Balık kargaları da yürürken bacakları daha kısa gibi görünür. Daha ayırt edici bir özellikleri ise balık kargaları öterken boğaz tüylerini kamburlaştırmaya ve kabartmaya meyillidir.
Amerikan kargasının vahşi doğada ortalama ömrü 7-8 yıldır. İnsan gözetimindeki kuşların ise 30 yıla kadar yaşadığı bilinir.
Durumu ve korunma
Çok sayıda karga, hem eğlence hem de toplu itlaf kampanyaları sebebiyle insanlar tarafından öldürülmüştür. Ancak soyları tükenme tehlikesinde değildir.
Kaynakça
Dış bağlantılar
Amerikan Karga Kafatası
Flickr'da Dünyadaki Kuşlar Üzerine Amerikan Kargası Resimleri
American Crow ötüşü
1822'de tanımlanan kuşlar
Amerika Birleşik Devletleri'ndeki kuşlar
Kuzey Amerika kuşları
Corvus
Webarşiv şablonu wayback bağlantıları
Otomatik taksonkutu eklenmesi gereken sayfalar | 25,667 |
https://ceb.wikipedia.org/wiki/Asthenotricha%20malostigma | Wikipedia | Open Web | CC-By-SA | 2,023 | Asthenotricha malostigma | https://ceb.wikipedia.org/w/index.php?title=Asthenotricha malostigma&action=history | Cebuano | Spoken | 42 | 87 | Kaliwatan sa alibangbang ang Asthenotricha malostigma. Una ning gihulagway ni Louis Beethoven Prout ni adtong 1921. Ang Asthenotricha malostigma sakop sa kahenera nga Asthenotricha, ug kabanay nga Geometridae. Walay nalista nga matang nga sama niini.
Ang mga gi basihan niini
Insekto
Asthenotricha | 23,628 |
https://es.wikipedia.org/wiki/Simulium%20anatinum | Wikipedia | Open Web | CC-By-SA | 2,023 | Simulium anatinum | https://es.wikipedia.org/w/index.php?title=Simulium anatinum&action=history | Spanish | Spoken | 29 | 62 | Simulium anatinum es una especie de insecto del género Simulium, familia Simuliidae, orden Diptera.
Fue descrita científicamente por Wood en 1963.
Referencias
Enlaces externos
anatinum
Insectos descritos en 1963 | 33,995 |
https://ceb.wikipedia.org/wiki/%C3%85ker%C3%B8yhamn | Wikipedia | Open Web | CC-By-SA | 2,023 | Åkerøyhamn | https://ceb.wikipedia.org/w/index.php?title=Åkerøyhamn&action=history | Cebuano | Spoken | 27 | 58 | Åkerøyhamn mao ang usa ka barangay nga nahimutang sa nasud Norway.
Tan-awa usab sa
Listahan sa mga barangay sa Norway
Pakisayran
Listahan sa mga barangay sa Norway | 7,530 |
https://zh.wikipedia.org/wiki/%E9%94%A1%E5%AE%B0%E6%8B%89%E9%A9%AC%E5%BE%B7%E8%8E%B1%E5%A8%9C | Wikipedia | Open Web | CC-By-SA | 2,023 | 锡宰拉马德莱娜 | https://zh.wikipedia.org/w/index.php?title=锡宰拉马德莱娜&action=history | Chinese | Spoken | 15 | 405 | 锡宰拉马德莱娜(,)是法国曼恩-卢瓦尔省的一个市镇,属于索米尔区
地理
锡宰拉马德莱娜()面积,位于法国卢瓦尔河地区大区曼恩-卢瓦尔省,该省份为法国西部内陆省份,大致对应安茹地区,北起顺时针与马耶讷省、萨尔特省、安德尔-卢瓦尔省、维埃纳省、德塞夫勒省、旺代省、大西洋卢瓦尔省和伊勒-维莱讷省接壤。
与锡宰拉马德莱娜接壤的市镇(或旧市镇、城区)包括:。
锡宰拉马德莱娜的时区为UTC+01:00、UTC+02:00(夏令时)。
行政
锡宰拉马德莱娜的邮政编码为,INSEE市镇编码为。
政治
锡宰拉马德莱娜所属的省级选区为。
人口
锡宰拉马德莱娜于时的人口数量为人。
参见
曼恩-卢瓦尔省市镇列表
参考文献
C | 5,672 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.